#include "leds.h" void led_init() { // debugging lights P5DIR |= BIT1; PJDIR |= BIT3; } void led_set(LEDS led, LED_STATES state) { // Get the pin control register and mask for the LED. if (state == LED_ON) { if (led == LED_RED) { P5OUT |= BIT1; } else { PJOUT |= BIT3; } } else { if (led == LED_RED) { P5OUT &= ~BIT1; } else { PJOUT &= ~BIT3; } } } void led_toggle(LEDS led) { if (led == LED_RED) { P5OUT ^= BIT1; } else { PJOUT ^= BIT3; } }