CButton::set_evt_cb() method
Register a callback function for a button_cb_type_t action.
Arguments
type
callback function type
cb
callback function for "TAP" action.
arg
Parameter for callback function
Return value
- ESP_OK Success - ESP_FAIL Parameter error
Notes
Button callback functions execute in the context of the timer service task. It is therefore essential that button callback functions never attempt to block. For example, a button callback function must not call vTaskDelay(), vTaskDelayUntil(), or specify a non zero block time when accessing a queue or a semaphore.
CButton::set_evt_cb() calls 1 function:
![]()
CButton::set_evt_cb()
CButton::set_evt_cb() reads 1 variable:
![]()
CButton::set_evt_cb()