Instead of just adding interrupt functionality, other setup steps will be implemented like IO initialization
This commit is contained in:
24
Telem_Debug/Debug_BlinkyLED-Advanced/main.c
Normal file
24
Telem_Debug/Debug_BlinkyLED-Advanced/main.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* main.c
|
||||
*/
|
||||
|
||||
#include "SunseekerTelemetry2021.h"
|
||||
|
||||
int main(void) {
|
||||
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer; `WDTPW` is the "WatchDog Timer PassWord", required for all `WDTCTL` operations
|
||||
_DINT(); // Disables interrupts
|
||||
|
||||
clock_init(); // Configure HF and LF clocks
|
||||
delay();
|
||||
|
||||
P8DIR = LEDG | LEDR | LEDY0 | LEDY1; // Set all four main LEDs as output
|
||||
P8OUT |= LEDG; // Turn on permanently the green LED
|
||||
|
||||
_EINT(); //enable global interrupts
|
||||
|
||||
while(1)
|
||||
{
|
||||
P8OUT ^= LEDY0 | LEDY1; // Toggle both yellow LEDs
|
||||
delay();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user