LED initialization fix and made things more explicit

This commit is contained in:
William Miceli
2021-05-18 10:41:16 -04:00
parent 54b7fdd2c5
commit 57c10b6c33

View File

@@ -11,8 +11,9 @@ int main(void) {
clock_init(); // Configure HF and LF clocks clock_init(); // Configure HF and LF clocks
delay(); delay();
P8DIR = LEDG | LEDR | LEDY0 | LEDY1; // Set all four main LEDs as output P8DIR |= LEDG | LEDR | LEDY0 | LEDY1; // Set all four main LEDs as output
P8OUT |= LEDG; // Turn on permanently the green LED P8OUT |= LEDG; // Turn on permanently the green LED
P8OUT &= ~(LEDY0 | LEDY1); // Initially set both yellow LEDs off
_EINT(); //enable global interrupts _EINT(); //enable global interrupts