UoS³ Flight Computer Firmware
 All Data Structures Files Functions Groups Pages
demo_watchdog.c
1 /* firmware.h contains all relevant headers */
2 
3 /* A very simple example that blinks the on-board LED. */
4 
5 // now modified to watchdog kick on interrupt
6 
7 #include "../firmware.h"
8 
9 int main(void)
10 {
11  Board_init();
12 
13  WDT_kick();
14 
15  LED_off(LED_B);
16  Delay_ms(1000); // so can be clearly seen when watchdog kicking
17 
18  setupwatchdoginterrupt(); // kick the watchdog on interrupt
19 
20  while(1) {}
21 }
void Delay_ms(uint32_t milliseconds)
Definition: delay.c:19
void LED_off(uint8_t led_num)
Definition: led.c:20
int main(void)
Runs all module tests.
Definition: test.c:19
void Board_init(void)
Definition: board.c:13
void WDT_kick(void)
Definition: wdt.c:19