ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
Loading...
Searching...
No Matches
iwdg.h
Go to the documentation of this file.
1
35#ifndef BSP_IWDG_H
36#define BSP_IWDG_H
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#include <stdint.h>
43#include <stdbool.h>
44
45/* ---- Prescaler encodings (PR register field) ---------------------------- */
46
47#define IWDG_PRESCALER_4 0u
48#define IWDG_PRESCALER_8 1u
49#define IWDG_PRESCALER_16 2u
50#define IWDG_PRESCALER_32 3u
51#define IWDG_PRESCALER_64 4u
52#define IWDG_PRESCALER_128 5u
53#define IWDG_PRESCALER_256 6u
54
66void IWDG_Init(uint8_t prescaler, uint16_t reload);
67
74void IWDG_Refresh(void);
75
84bool IWDG_WasReset(void);
85
93void IWDG_ClearResetFlag(void);
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif /* BSP_IWDG_H */
void IWDG_Init(uint8_t prescaler, uint16_t reload)
Configure and start the independent watchdog.
Definition iwdg.c:44
void IWDG_Refresh(void)
Reload the watchdog counter ("kick" / "feed").
Definition iwdg.c:70
bool IWDG_WasReset(void)
Was the most recent reset caused by the IWDG?
Definition iwdg.c:74
void IWDG_ClearResetFlag(void)
Clear the IWDG reset flag in RCC->RSR.
Definition iwdg.c:78