Function esp_idf_svc::sys::gptimer_set_alarm_action
source ยท pub unsafe extern "C" fn gptimer_set_alarm_action(
timer: *mut gptimer_t,
config: *const gptimer_alarm_config_t,
) -> i32
Expand description
@brief Set alarm event actions for GPTimer.
@note This function is allowed to run within ISR context, so that user can set new alarm action immediately in the ISR callback.
@note If CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM
is enabled, this function will be placed in the IRAM by linker,
makes it possible to execute even when the Flash Cache is disabled.
@param[in] timer Timer handle created by gptimer_new_timer
@param[in] config Alarm configuration, especially, set config to NULL means disabling the alarm function
@return
- ESP_OK: Set alarm action for GPTimer successfully
- ESP_ERR_INVALID_ARG: Set alarm action for GPTimer failed because of invalid argument
- ESP_FAIL: Set alarm action for GPTimer failed because of other error