@web-font-path: "roboto-debian.css";
Loading...
Searching...
No Matches
watchdog.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _HARDWARE_WATCHDOG_H
8#define _HARDWARE_WATCHDOG_H
9
10#include "pico.h"
11#include "hardware/structs/watchdog.h"
12
29#ifdef __cplusplus
30extern "C" {
31#endif
32
45void watchdog_reboot(uint32_t pc, uint32_t sp, uint32_t delay_ms);
46
53void watchdog_start_tick(uint cycles);
54
59void watchdog_update(void);
60
78void watchdog_enable(uint32_t delay_ms, bool pause_on_debug);
79
87bool watchdog_caused_reboot(void);
88
107
114uint32_t watchdog_get_count(void);
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif
void watchdog_update(void)
Reload the watchdog counter with the amount of time set in watchdog_enable.
Definition watchdog.c:25
bool watchdog_enable_caused_reboot(void)
Did watchdog_enable cause the last reboot?
Definition watchdog.c:104
bool watchdog_caused_reboot(void)
Did the watchdog cause the last reboot?
Definition watchdog.c:99
uint32_t watchdog_get_count(void)
Returns the number of microseconds before the watchdog will reboot the chip.
Definition watchdog.c:30
void watchdog_enable(uint32_t delay_ms, bool pause_on_debug)
Enable the watchdog.
Definition watchdog.c:70
void watchdog_reboot(uint32_t pc, uint32_t sp, uint32_t delay_ms)
Define actions to perform at watchdog timeout.
Definition watchdog.c:77
void watchdog_start_tick(uint cycles)
Start the watchdog tick.
Definition watchdog.c:14