1 #ifndef DEB_LED_BOARD_H
2 #define DEB_LED_BOARD_H
7 #define __LED_MASK 0x0f
9 #define LEDG (1<<0) // LED R (1<<25)
10 #define LEDR (1<<1) // LED G (1<<26)
11 #define LEDY (1<<2) // LED B (1<<27)
12 #define LEDB (1<<3) // LED Y (1<<28)
14 #define DEB_LED_ERROR LEDR /* Error occured */
15 #define DEB_LED_RUN LEDG /* Should blink when running */
17 static inline unsigned
20 return (FIO1PIN >> __LED_SHIFT) & __LED_MASK;
24 __deb_led_on(unsigned leds)
26 FIO1CLR = (leds & __LED_MASK) << __LED_SHIFT;
30 __deb_led_off(unsigned leds)
32 FIO1SET = (leds & __LED_MASK) << __LED_SHIFT;
36 __deb_led_set(unsigned leds)
43 __deb_led_change(unsigned leds)
45 __deb_led_set(__deb_led_get() ^ leds);
51 FIO1DIR |= (__LED_MASK << __LED_SHIFT);