EasyManua.ls Logo

Espressif ESP32-S2 - Page 257

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
Return
Interrupt status
Parameters
group_num: Timer group number, 0 for TIMERG0 or 1 for TIMERG1
void timer_group_clr_intr_sta_in_isr(timer_group_t group_num, timer_intr_t intr_mask)
Clear the masked interrupt status, just used in ISR.
Parameters
group_num: Timer group number, 0 for TIMERG0 or 1 for TIMERG1
intr_mask: Masked interrupt.
bool timer_group_get_auto_reload_in_isr(timer_group_t group_num, timer_idx_t
timer_num)
Get auto reload enable status, just used in ISR.
Return
True Auto reload enabled
False Auto reload disabled
Parameters
group_num: Timer group number, 0 for TIMERG0 or 1 for TIMERG1
timer_num: Timer index
esp_err_t timer_spinlock_take(timer_group_t group_num)
Take timer spinlock to enter critical protect.
Note Deprecated, the recommended way is to use ISR callbacks instead, see timer_group_example_main
Return
ESP_OK Success
ESP_ERR_INVALID_ARG Parameter error
Parameters
group_num: Timer group number, 0 for TIMERG0 or 1 for TIMERG1
esp_err_t timer_spinlock_give(timer_group_t group_num)
Give timer spinlock to exit critical protect.
Note Deprecated, the recommended way is to use ISR callbacks instead, see timer_group_example_main
Return
ESP_OK Success
ESP_ERR_INVALID_ARG Parameter error
Parameters
group_num: Timer group number, 0 for TIMERG0 or 1 for TIMERG1
Macros
TIMER_BASE_CLK
Frequency of the clock on the input of the timer groups
Type Definitions
typedef bool (*timer_isr_t)(void *)
Interrupt handle callback function. User need to retrun a bool value in callback.
Return
True Do task yield at the end of ISR
False Not do task yield at the end of ISR
Note If you called FreeRTOS functions in callback, you need to return true or false based on the retrun value
of argument pxHigherPriorityTaskWoken. For example, xQueueSendFromISR is called in
callback, if the return value pxHigherPriorityTaskWoken of any FreeRTOS calls is pdTRUE,
return true; otherwise return false.
typedef intr_handle_t timer_isr_handle_t
Interrupt handle, used in order to free the isr after use. Aliases to an int handle for now.
Espressif Systems 246
Submit Document Feedback
Release v4.4

Table of Contents