Anastasios Barlas
/
Watchdog_sample_nocoverage
Lab 6 Part 1
Fork of Watchdog_sample_nocoverage by
wdt.h@8:3a8c46bc268f, 2018-03-09 (annotated)
- Committer:
- AnastasiosBarlas
- Date:
- Fri Mar 09 23:25:44 2018 +0000
- Revision:
- 8:3a8c46bc268f
- Parent:
- 1:159a09ac60ba
Lab 6 Part 1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
WilliamMarshQMUL | 1:159a09ac60ba | 1 | |
WilliamMarshQMUL | 1:159a09ac60ba | 2 | #ifndef WDT_H |
WilliamMarshQMUL | 1:159a09ac60ba | 3 | #define WDT_H |
WilliamMarshQMUL | 1:159a09ac60ba | 4 | |
WilliamMarshQMUL | 1:159a09ac60ba | 5 | // Simple Library for Watchdog |
WilliamMarshQMUL | 1:159a09ac60ba | 6 | // --------------------------- |
WilliamMarshQMUL | 1:159a09ac60ba | 7 | |
WilliamMarshQMUL | 1:159a09ac60ba | 8 | // Initialise watchdog using 1KHz clock |
WilliamMarshQMUL | 1:159a09ac60ba | 9 | // To prevent overwriting, only a single write to the COPC register possible |
WilliamMarshQMUL | 1:159a09ac60ba | 10 | // |
WilliamMarshQMUL | 1:159a09ac60ba | 11 | void wdt_1sec() ; // 1024ms, not windowed, DEFAULT |
WilliamMarshQMUL | 1:159a09ac60ba | 12 | void wdt_256ms(); // 256ms, not windowed |
WilliamMarshQMUL | 1:159a09ac60ba | 13 | void wdt_32ms(); // 32ms, not windowed |
WilliamMarshQMUL | 1:159a09ac60ba | 14 | |
WilliamMarshQMUL | 1:159a09ac60ba | 15 | // Kick (feed, reload) our watchdog timer |
WilliamMarshQMUL | 1:159a09ac60ba | 16 | void wdt_kick_all(); // full sequence |
WilliamMarshQMUL | 1:159a09ac60ba | 17 | void wdt_kickA(); // first part |
WilliamMarshQMUL | 1:159a09ac60ba | 18 | void wdt_kickB(); // second part |
WilliamMarshQMUL | 1:159a09ac60ba | 19 | |
WilliamMarshQMUL | 1:159a09ac60ba | 20 | #endif |