Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "watchdog.h"
- #include "diodes.h"
- #include "buttons.h"
- void main( )
- {
- disableWDT();
- initDiodes();
- initButtons();
- offSTATUS();
- enableWDT(ACLK, DIV512);
- if(wasWDTReset())
- {
- clearInterruptFlag();
- onSTATUS();
- }
- while(1)
- {
- if(isB1Pressed())
- while(1) {}
- else
- resetWDTClock();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement