software:firmware
MakAir Firmware
|
Watchdog for the Raspberry PI. More...
#include <rpi_watchdog.h>
Public Member Functions | |
RpiWatchdog () | |
Default constructor. More... | |
void | update () |
This should be called by the main state machine every 1s. More... | |
void | resetCountDown () |
When the UI software on the Raspberry PI sends a heartbeat, reset countdown. More... | |
void | disable () |
Disable countdown mode (used for debug) More... | |
Private Types | |
enum | RpiWatchdogStep { COUNT_DOWN , SWITCH_OFF_RASPBERRY , SWITCH_ON_RASPBERRY , WAIT_FOR_FIRST_HEARTBEAT , DISABLED } |
Private Attributes | |
int32_t | m_countDown |
RpiWatchdogStep | m_rpiWatchdogStep |
Watchdog for the Raspberry PI.
Definition at line 15 of file rpi_watchdog.h.
|
private |
Enumerator | |
---|---|
COUNT_DOWN | |
SWITCH_OFF_RASPBERRY | |
SWITCH_ON_RASPBERRY | |
WAIT_FOR_FIRST_HEARTBEAT | |
DISABLED |
Definition at line 31 of file rpi_watchdog.h.
RpiWatchdog::RpiWatchdog | ( | ) |
Default constructor.
Definition at line 20 of file rpi_watchdog.cpp.
void RpiWatchdog::disable | ( | ) |
void RpiWatchdog::resetCountDown | ( | ) |
When the UI software on the Raspberry PI sends a heartbeat, reset countdown.
Definition at line 50 of file rpi_watchdog.cpp.
void RpiWatchdog::update | ( | ) |
This should be called by the main state machine every 1s.
Definition at line 25 of file rpi_watchdog.cpp.
|
private |
Definition at line 30 of file rpi_watchdog.h.
|
private |
Definition at line 38 of file rpi_watchdog.h.