MCU
Loading...
Searching...
No Matches
WatchdogInterface.h
Go to the documentation of this file.
1#ifndef __WATCHDOG_INTERFACE_H__
2#define __WATCHDOG_INTERFACE_H__
3
4#include <Arduino.h>
5
6const unsigned long WATCHDOG_KICK_INTERVAL = 10; // milliseconds
7
9{
10private:
11 /* Watchdog last kicked time */
12 unsigned long watchdog_time;
13
14 /* Watchdog output state */
16
17 /* Hardware interface pins */
19
20public:
21 WatchdogInterface(int wd_input_pin): pin_watchdog_input_(wd_input_pin){};
22
23 /* Initialize interface pin mode */
24 void init(unsigned long curr_millis);
25
26 /* Write to Main ECU */
27 // Initialize output value
28 void set_start_state();
29
30 /* Kick watchdog */
31 void kick_watchdog(unsigned long curr_millis);
32
33 /* Getters */
34 bool get_watchdog_state();
35 /* Setters */
36 void set_watchdog_state(bool state);
37
38};
39
40#endif /* __WATCHDOG_INTERFACE_H__ */
void init(unsigned long curr_millis)
unsigned long watchdog_time
void kick_watchdog(unsigned long curr_millis)
void set_watchdog_state(bool state)
WatchdogInterface(int wd_input_pin)
const unsigned long WATCHDOG_KICK_INTERVAL