CButton::add_custom_cb() method
Arguments
press_sec
the callback function would be called if you press the button for a specified period of time
cb
callback function for "PRESS" 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::add_custom_cb() calls 1 function:
![]()
CButton::add_custom_cb()
CButton::add_custom_cb() reads 1 variable:
![]()
CButton::add_custom_cb()