47 LEDS_PxDIR |= (LEDS_CONF_RED | LEDS_CONF_GREEN | LEDS_CONF_YELLOW);
48 LEDS_PxOUT |= (LEDS_CONF_RED | LEDS_CONF_GREEN | LEDS_CONF_YELLOW);
51 static const unsigned char l2p[LEDS_ALL + 1] = {
55 LEDS_CONF_YELLOW | LEDS_CONF_GREEN,
57 LEDS_CONF_RED | LEDS_CONF_GREEN,
58 LEDS_CONF_RED | LEDS_CONF_YELLOW,
59 LEDS_CONF_RED | LEDS_CONF_YELLOW | LEDS_CONF_GREEN
64 leds_on(
unsigned char leds)
66 LEDS_PxOUT &= ~l2p[leds & LEDS_ALL];
70 leds_off(
unsigned char leds)
72 LEDS_PxOUT |= l2p[leds & LEDS_ALL];
76 leds_toggle(
unsigned char leds)
81 asm(
".global leds_invert\nleds_invert:\n");
83 LEDS_PxOUT ^= l2p[leds & LEDS_ALL];