Add state to string API function
Added a state to string public API function. There was already a private function (`relay_chn_state_str`) that provides this functionality. So this function has been renamed to `relay_chn_state_to_str` and made publicly available. Refs #1104, #1105 and closes #1108.
This commit is contained in:
@@ -63,6 +63,14 @@ esp_err_t relay_chn_register_listener(relay_chn_state_listener_t listener);
|
||||
*/
|
||||
void relay_chn_unregister_listener(relay_chn_state_listener_t listener);
|
||||
|
||||
/**
|
||||
* @brief Return the text presentation of an state.
|
||||
*
|
||||
* @param state A state with type of relay_chn_state_t.
|
||||
* @return char* The text presentation of the state. "UNKNOWN" if the state is not known.
|
||||
*/
|
||||
char *relay_chn_state_to_str(relay_chn_state_t state);
|
||||
|
||||
#if CONFIG_RELAY_CHN_ENABLE_TILTING
|
||||
/**
|
||||
* @brief Get the default tilting sensitivity for the relay channel.
|
||||
|
||||
Reference in New Issue
Block a user