2 * Copyright © 2012 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29 #define AO_LED_TYPE uint32_t
32 /* Turn on the specified LEDs */
34 ao_led_on(AO_LED_TYPE colors);
36 /* Turn off the specified LEDs */
38 ao_led_off(AO_LED_TYPE colors);
40 /* Set all of the LEDs to the specified state */
42 ao_led_set(AO_LED_TYPE colors);
44 /* Set all LEDs in 'mask' to the specified state */
46 ao_led_set_mask(AO_LED_TYPE colors, AO_LED_TYPE mask);
48 /* Turn on the specified LEDs for the indicated interval */
50 ao_led_for(AO_LED_TYPE colors, AO_TICK_TYPE ticks);
52 /* Initialize the LEDs */
57 #define AO_LED_0 (1 << 0)
62 #define AO_LED_1 (1 << 1)
67 #define AO_LED_2 (1 << 2)
72 #define AO_LED_3 (1 << 3)
77 #define AO_LED_4 (1 << 4)
82 #define AO_LED_5 (1 << 5)
87 #define AO_LED_6 (1 << 6)
92 #define AO_LED_7 (1 << 7)
97 #define AO_LED_8 (1 << 8)
102 #define AO_LED_9 (1 << 9)
107 #define AO_LED_10 (1 << 10)
112 #define AO_LED_11 (1 << 11)
117 #define AO_LED_12 (1 << 12)
122 #define AO_LED_13 (1 << 13)
127 #define AO_LED_14 (1 << 14)
132 #define AO_LED_15 (1 << 15)
137 #define AO_LED_16 (1 << 16)
142 #define AO_LED_17 (1 << 17)
147 #define AO_LED_18 (1 << 18)
152 #define AO_LED_19 (1 << 19)
157 #define AO_LED_20 (1 << 20)
162 #define AO_LED_21 (1 << 21)
167 #define AO_LED_22 (1 << 22)
172 #define AO_LED_23 (1 << 23)
177 #define AO_LED_24 (1 << 24)
182 #define AO_LED_25 (1 << 25)
187 #define AO_LED_26 (1 << 26)
192 #define AO_LED_27 (1 << 27)
197 #define AO_LED_28 (1 << 28)
202 #define AO_LED_29 (1 << 29)
207 #define AO_LED_30 (1 << 30)
212 #define AO_LED_31 (1 << 31)
217 #define AO_LEDS_AVAILABLE (AO_LED_0 | \
250 #ifndef LEDS_AVAILABLE
251 #define LEDS_AVAILABLE AO_LEDS_AVAILABLE
254 #endif /* _AO_LED_H_ */