c533099e08
1. minor modifications 2. use TIMG_WDT_INT_ENA_M instead of BIT(2) in wdt.c 3. add doc/api/timer.rst
73 lines
1.7 KiB
ReStructuredText
73 lines
1.7 KiB
ReStructuredText
TIMER
|
|
========
|
|
|
|
Overview
|
|
--------
|
|
|
|
ESP32 chip contains two hardware timer groups, each containing two general-purpose hardware timers.
|
|
|
|
They are all 64-bit generic timers based on 16-bit prescalers and 64-bit auto-reload-capable up/down counters.
|
|
|
|
|
|
Application Example
|
|
-------------------
|
|
|
|
64-bit hardware timer example: `examples/13_timer_group <https://github.com/espressif/esp-idf/tree/master/examples/13_timer_group>`_.
|
|
|
|
API Reference
|
|
-------------
|
|
|
|
Header Files
|
|
^^^^^^^^^^^^
|
|
|
|
* `components/driver/timer.h <https://github.com/espressif/esp-idf/blob/master/components/driver/include/driver/timer.h>`_
|
|
|
|
Macros
|
|
^^^^^^
|
|
|
|
.. doxygendefine:: TIMER_BASE_CLK
|
|
|
|
Type Definitions
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
|
|
Enumerations
|
|
^^^^^^^^^^^^
|
|
|
|
.. doxygenenum:: timer_group_t
|
|
.. doxygenenum:: timer_idx_t
|
|
.. doxygenenum:: timer_count_dir_t
|
|
.. doxygenenum:: timer_start_t
|
|
.. doxygenenum:: timer_alarm_t
|
|
.. doxygenenum:: timer_intr_mode_t
|
|
.. doxygenenum:: timer_autoreload_t
|
|
|
|
Structures
|
|
^^^^^^^^^^
|
|
|
|
.. doxygenstruct:: timer_config_t
|
|
:members:
|
|
|
|
|
|
Functions
|
|
^^^^^^^^^
|
|
|
|
.. doxygenfunction:: timer_get_counter_value
|
|
.. doxygenfunction:: timer_get_counter_time_sec
|
|
.. doxygenfunction:: timer_set_counter_value
|
|
.. doxygenfunction:: timer_start
|
|
.. doxygenfunction:: timer_pause
|
|
.. doxygenfunction:: timer_set_counter_mode
|
|
.. doxygenfunction:: timer_set_auto_reload
|
|
.. doxygenfunction:: timer_set_divider
|
|
.. doxygenfunction:: timer_set_alarm_value
|
|
.. doxygenfunction:: timer_get_alarm_value
|
|
.. doxygenfunction:: timer_set_alarm
|
|
.. doxygenfunction:: timer_isr_register
|
|
.. doxygenfunction:: timer_init
|
|
.. doxygenfunction:: timer_get_config
|
|
.. doxygenfunction:: timer_group_intr_enable
|
|
.. doxygenfunction:: timer_group_intr_disable
|
|
.. doxygenfunction:: timer_enable_intr
|
|
.. doxygenfunction:: timer_disable_intr
|
|
|