You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Difference between esp_event_handler_instance_[un]register*() and esp_event_handler_[un]register*() not very clear in documentation (IDFGH-11711)
#12818
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
General issue report
Maybe it should be explicitly stated that esp_event_handler_instance_[un]register*() does the same thing as esp_event_handler_[un]register*(), but a same same handler to the same event return yet another instance instead of replacing the previous one.
Also, I'm wondering why would one register twice the same handler to the same event ? Except if it is to pass a different argument. If that is so (That is what I think, but I had to check the sources to get to it), then that should also be documented.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Difference between esp_event_handler_instance_[un]register*() and esp_event_handler_[un]register*() not very clear in documentation
Difference between esp_event_handler_instance_[un]register*() and esp_event_handler_[un]register*() not very clear in documentation (IDFGH-11711)
Dec 17, 2023
There is also this "legacy" thing, which is not very meaningful either: is it deprecated ? Is it because it's in process of refactoring, and later this instance pointer will become the handle ?
I think that the meaning of the instance parameter is fairly well defined in esp_event_handler_instance_register and any function in which it appears in general.
I agree that there could be a note added to inform that calling esp_event_handler_instance_register with instance set to NULL is the same as calling esp_event_handler_register.
Answers checklist.
General issue report
Maybe it should be explicitly stated that
esp_event_handler_instance_[un]register*()
does the same thing asesp_event_handler_[un]register*()
, but a same same handler to the same event return yet another instance instead of replacing the previous one.Also, I'm wondering why would one register twice the same handler to the same event ? Except if it is to pass a different argument. If that is so (That is what I think, but I had to check the sources to get to it), then that should also be documented.
The text was updated successfully, but these errors were encountered: