Update docs for the state_listener_manager API.
This commit is contained in:
@@ -63,9 +63,12 @@ typedef enum relay_chn_state_enum relay_chn_state_t;
|
||||
|
||||
/**
|
||||
* @brief Relay channel state change listener.
|
||||
*
|
||||
*
|
||||
* An optional interface to listen to the channel state change events.
|
||||
*
|
||||
* The listeners SHOULD be implemented as light functions and SHOULD NOT contain
|
||||
* any blocking calls. Otherwise the relay_chn module would not function properly
|
||||
* since it is designed as event driven.
|
||||
*
|
||||
* @param chn_id The ID of the channel whose state has changed.
|
||||
* @param old_state The old state of the channel.
|
||||
* @param new_state The new state of the channel.
|
||||
|
||||
@@ -85,10 +85,12 @@ typedef struct relay_chn_type {
|
||||
esp_timer_handle_t inertia_timer; ///< Timer to handle the opposite direction inertia time.
|
||||
} relay_chn_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Structure to manage the state change listeners.
|
||||
*/
|
||||
struct relay_chn_state_listener_manager_type {
|
||||
uint8_t listener_count;
|
||||
relay_chn_state_listener_t *listeners;
|
||||
uint8_t listener_count; ///< The number of registered listeners.
|
||||
relay_chn_state_listener_t *listeners; ///< The list that holds references to the registered listeners.
|
||||
} relay_chn_state_listener_manager;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user