dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_wdg.h
Go to the documentation of this file.
1 
15 /*
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful, but
22  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  * for more details.
25  *
26  * You should have received a copy of the GNU General Public License along
27  * with this program; if not, see <http://www.gnu.org/licenses/>
28  */
29 
30 #ifndef PIOS_WDG
31 #define PIOS_WDG
32 
33 #include "stdbool.h"
34 
35 #define PIOS_WDG_ACTUATOR 0x0001
36 #define PIOS_WDG_STABILIZATION 0x0002
37 #define PIOS_WDG_ATTITUDE 0x0004
38 #define PIOS_WDG_MANUAL 0x0008
39 #define PIOS_WDG_SENSORS 0x0010
40 
41 uint16_t PIOS_WDG_Init();
42 bool PIOS_WDG_RegisterFlag(uint16_t flag_requested);
43 bool PIOS_WDG_UpdateFlag(uint16_t flag);
44 uint16_t PIOS_WDG_GetBootupFlags();
45 uint16_t PIOS_WDG_GetActiveFlags();
46 void PIOS_WDG_Clear(void);
47 
48 #endif
bool PIOS_WDG_RegisterFlag(uint16_t flag_requested)
Register a module against the watchdog.
Definition: pios_wdg.c:86
bool PIOS_WDG_UpdateFlag(uint16_t flag)
Function called by modules to indicate they are still running.
Definition: pios_wdg.c:102
uint16_t PIOS_WDG_GetBootupFlags()
Returns the flags that were set at bootup.
Definition: pios_wdg.c:125
uint16_t PIOS_WDG_GetActiveFlags()
Returns the currently active flags.
Definition: pios_wdg.c:137
void PIOS_WDG_Clear(void)
Clear the watchdog timer.
Definition: pios_wdg.c:147
uint16_t PIOS_WDG_Init()
Initialize the watchdog timer for a specified timeout.
Definition: pios_wdg.c:63
uint32_t flag
Definition: msp_messages.h:99