feat(gptimer): support set interrupt priority

Related forum post: https://esp32.com/viewtopic.php?f=13&t=34959
This commit is contained in:
morris
2023-08-02 11:26:47 +08:00
parent e297470e62
commit c32cabc7f8
6 changed files with 20 additions and 3 deletions

View File

@@ -48,6 +48,8 @@ To install a timer instance, there is a configuration structure that needs to be
- :cpp:member:`gptimer_config_t::resolution_hz` sets the resolution of the internal counter. Each count step is equivalent to **1 / resolution_hz** seconds.
- :cpp:member:`gptimer_config::intr_priority` sets the priority of the timer interrupt. If it is set to ``0``, the driver will allocate an interrupt with a default priority. Otherwise, the driver will use the given priority.
- Optional :cpp:member:`gptimer_config_t::intr_shared` sets whether or not mark the timer interrupt source as a shared one. For the pros/cons of a shared interrupt, you can refer to :doc:`Interrupt Handling <../../api-reference/system/intr_alloc>`.
With all the above configurations set in the structure, the structure can be passed to :cpp:func:`gptimer_new_timer` which will instantiate the timer instance and return a handle of the timer.