docs(gptimer): include etm content conditionally

https://www.esp32.com/viewtopic.php?f=12&t=40991&p=135107#p135098
This commit is contained in:
morris
2024-07-26 11:07:22 +08:00
parent d371677736
commit 53e3df2e03
5 changed files with 22 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ The following sections of this document cover the typical steps to install and o
- :ref:`gptimer-register-event-callbacks` - covers how to hook user specific code to the alarm event callback function.
- :ref:`enable-and-disable-timer` - covers how to enable and disable the timer.
- :ref:`start-and-stop-timer` - shows some typical use cases that start the timer with different alarm behavior.
:SOC_ETM_SUPPORTED and SOC_TIMER_SUPPORT_ETM: - :ref:`gptimer-etm-event-and-task` - describes what the events and tasks can be connected to the ETM channel.
:SOC_TIMER_SUPPORT_ETM: - :ref:`gptimer-etm-event-and-task` - describes what the events and tasks can be connected to the ETM channel.
- :ref:`gptimer-power-management` - describes how different source clock selections can affect power consumption.
- :ref:`gptimer-iram-safe` - describes tips on how to make the timer interrupt and IO control functions work better along with a disabled cache.
- :ref:`gptimer-thread-safety` - lists which APIs are guaranteed to be thread safe by the driver.
@@ -261,7 +261,7 @@ Alarm value can be updated dynamically inside the ISR handler callback, by chang
ESP_ERROR_CHECK(gptimer_start(gptimer, &alarm_config));
.. only:: SOC_ETM_SUPPORTED and SOC_TIMER_SUPPORT_ETM
.. only:: SOC_TIMER_SUPPORT_ETM
.. _gptimer-etm-event-and-task:
@@ -274,7 +274,7 @@ Alarm value can be updated dynamically inside the ISR handler callback, by chang
.. _gptimer-power-management:
.. only:: not SOC_ETM_SUPPORTED or not SOC_TIMER_SUPPORT_ETM
.. only:: not SOC_TIMER_SUPPORT_ETM
.. _gptimer-power-management:
@@ -348,10 +348,13 @@ API Reference
-------------
.. include-build-file:: inc/gptimer.inc
.. include-build-file:: inc/gptimer_etm.inc
.. include-build-file:: inc/gptimer_types.inc
.. include-build-file:: inc/timer_types.inc
.. only:: SOC_TIMER_SUPPORT_ETM
.. include-build-file:: inc/gptimer_etm.inc
.. [1]
Different ESP chip series might have different numbers of GPTimer instances. For more details, please refer to **{IDF_TARGET_NAME} Technical Reference Manual** > Chapter **Timer Group (TIMG)** [`PDF <{IDF_TARGET_TRM_EN_URL}#timg>`__]. The driver does forbid you from applying for more timers, but it returns error when all available hardware resources are used up. Please always check the return value when doing resource allocation (e.g., :cpp:func:`gptimer_new_timer`).