mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(doc): Update the WDT article
Closes https://github.com/espressif/esp-idf/issues/12995
This commit is contained in:
committed by
BOT
parent
afa876fac9
commit
c40afaf4ad
@@ -140,6 +140,29 @@ The following HAL function examples are selected from the Watchdog Timer HAL as
|
||||
// De-initialize the WDT
|
||||
void wdt_hal_deinit(wdt_hal_context_t *hal);
|
||||
|
||||
.. _hw-abstraction-hal-layer-disable-rtc-wdt:
|
||||
|
||||
To disable RTC_WDT
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
|
||||
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
|
||||
wdt_hal_disable(&rtc_wdt_ctx);
|
||||
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
|
||||
|
||||
.. _hw-abstraction-hal-layer-feed-rtc-wdt:
|
||||
|
||||
To reset the RTC_WDT counter
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
|
||||
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
|
||||
wdt_hal_feed(&rtc_wdt_ctx);
|
||||
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
|
||||
|
||||
HAL functions generally have the following characteristics:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user