iot_button_set_serial_cb() function
Register a callback function for a serial trigger event.
Arguments
btn_handle
handle of the button object @start_after_sec define the time after which to start serial trigger action @interval_tick serial trigger interval @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.