PER Firmware
Loading...
Searching...
No Matches
watchdog.h
Go to the documentation of this file.
1
8#ifndef WATCHDOG_H
9#define WATCHDOG_H
10
11#include <stdint.h>
13
14void WDG_init(void);
15void WDG_pet(void);
16uint32_t WDG_get_CSR(void);
17bool was_reset_by_WDG(void);
18
19static constexpr uint32_t WATCHDOG_TIMEOUT_MS = 1000;
20static constexpr uint32_t WATCHDOG_PET_PERIOD_MS = 100;
21
22#define DEFINE_WATCHDOG_TASK() DEFINE_TASK(WDG_pet, WATCHDOG_PET_PERIOD_MS, osPriorityLow, STACK_256)
23
24#define START_WATCHDOG_TASK() START_TASK(WDG_pet)
25
26#endif // WATCHDOG_H
Wrapper macros for FreeRTOS constructs (tasks, queues, semaphores) to simplify static memory allocati...