Watchdog Driver.
More...
#include <bsp/raspberrypi.h>
#include <bsp/watchdog.h>
|
#define | PM_WDOG BCM2835_REG(BCM2711_PM_WDOG) |
|
#define | PM_RSTC BCM2835_REG(BCM2711_PM_RSTC) |
|
|
void | raspberrypi_watchdog_init () |
| Initialize BSP watchdog routines.
|
|
void | raspberrypi_watchdog_start (uint32_t timeout_ms) |
| Turn on the watchdog / begin the counter at the desired value.
|
|
void | raspberrypi_watchdog_stop () |
| Turn off the watchdog.
|
|
void | raspberrypi_watchdog_reload () |
| Reload watchdog.
|
|
uint32_t | raspberrypi_watchdog_get_remaining_time () |
| Get the remaining time of the watchdog. The return value is still valid when the watchdog has been stopped.
|
|
|
uint32_t | raspberrypi_watchdog_timeout |
|
◆ raspberrypi_watchdog_get_remaining_time()
uint32_t raspberrypi_watchdog_get_remaining_time |
( |
void |
| ) |
|
Get the remaining time of the watchdog. The return value is still valid when the watchdog has been stopped.
- Return values
-
Watchdog | remaining time in ms. |
◆ raspberrypi_watchdog_init()
void raspberrypi_watchdog_init |
( |
void |
| ) |
|
◆ raspberrypi_watchdog_start()
void raspberrypi_watchdog_start |
( |
uint32_t |
timeout_ms | ) |
|
Turn on the watchdog / begin the counter at the desired value.
- Parameters
-
timeout | Watchdog timeout value in ms. The watchdog device has 20 bits of timeout, so it only supports a maximum of 15999 ms for its timeout. This value should be between 0 and 15999. |