kopia lustrzana https://github.com/espressif/esp-idf
docs: Fix wrong statement about set/get gptimer raw count
rodzic
28340977bd
commit
0244f7a9b5
|
@ -146,7 +146,7 @@ Breaking Changes in Usage
|
|||
|
||||
- Timer initialization is done by creating a timer instance from :cpp:func:`gptimer_new_timer`. Basic configurations like clock source, resolution and direction should be set in :cpp:type:`gptimer_config_t`. Note that, specific configurations of alarm events are not needed during the installation stage of the driver.
|
||||
- Alarm event is configured by :cpp:func:`gptimer_set_alarm_action`, with parameters set in the :cpp:type:`gptimer_alarm_config_t`.
|
||||
- Setting and getting count value are done by :cpp:func:`gptimer_get_raw_count` and :cpp:func:`gptimer_set_raw_count`. The driver does not help convert the raw value into UTC time-stamp. Instead, the conversion should be done from user's side as the timer resolution is also known to the user.
|
||||
- Setting and getting count value are done by :cpp:func:`gptimer_set_raw_count` and :cpp:func:`gptimer_get_raw_count`. The driver does not help convert the raw value into UTC time-stamp. Instead, the conversion should be done from user's side as the timer resolution is also known to the user.
|
||||
- The driver will install the interrupt service as well if :cpp:member:`gptimer_event_callbacks_t::on_alarm` is set to a valid callback function. In the callback, users do not have to deal with the low level registers (like "clear interrupt status", "re-enable alarm event" and so on). So functions like ``timer_group_get_intr_status_in_isr`` and ``timer_group_get_auto_reload_in_isr`` are not used anymore.
|
||||
- To update the alarm configurations when alarm event happens, one can call :cpp:func:`gptimer_set_alarm_action` in the interrupt callback, then the alarm will be re-enabled again.
|
||||
- Alarm will always be re-enabled by the driver if :cpp:member:`gptimer_alarm_config_t::auto_reload_on_alarm` is set to true.
|
||||
|
|
|
@ -146,7 +146,7 @@ GPIO
|
|||
|
||||
- 更新后,通过从 :cpp:func:`gptimer_new_timer` 创建定时器示例可以初始化定时器。用户可以在 :cpp:type:`gptimer_config_t` 进行一些基本设置,如时钟源,分辨率和计数方向。请注意,无需在驱动安装阶段进行报警事件的特殊设置。
|
||||
- 更新后,报警事件在 :cpp:func:`gptimer_set_alarm_action` 中进行设置,参数在 :cpp:type:`gptimer_alarm_config_t` 中进行设置。
|
||||
- 更新后,通过 :cpp:func:`gptimer_get_raw_count` 设置计数数值,通过 :cpp:func:`gptimer_set_raw_count` 获取计数数值。驱动不会自动将原始数据同步到 UTC 时间戳。由于定时器的分辨率已知,用户可以自行转换数据。
|
||||
- 更新后,通过 :cpp:func:`gptimer_set_raw_count` 设置计数数值,通过 :cpp:func:`gptimer_get_raw_count` 获取计数数值。驱动不会自动将原始数据同步到 UTC 时间戳。由于定时器的分辨率已知,用户可以自行转换数据。
|
||||
- 更新后,如果 :cpp:member:`gptimer_event_callbacks_t::on_alarm` 被设置为有效的回调函数,驱动程序也会安装中断服务。在回调函数中,用户无需配置底层寄存器,如用于“清除中断状态”,“重新使能事件”的寄存器等。因此, ``timer_group_get_intr_status_in_isr`` 与 ``timer_group_get_auto_reload_in_isr`` 这些函数不再使用。
|
||||
- 更新后,当报警事件发生时,为更新报警配置,用户可以在中断回调中调用 :cpp:func:`gptimer_set_alarm_action`,这样报警事件会被重新使能。
|
||||
- 更新后,如果用户将 :cpp:member:`gptimer_alarm_config_t::auto_reload_on_alarm` 设置为 true,报警事件将会一直被驱动程序使能。
|
||||
|
|
Ładowanie…
Reference in New Issue