altos: Remove old AO_SEND_ALL_BARO bits
[fw/altos] / src / kernel / ao_led.h
1 /*
2  * Copyright © 2012 Keith Packard <keithp@keithp.com>
3  *
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; version 2 of the License.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
16  */
17
18 #ifndef _AO_LED_H_
19 #define _AO_LED_H_
20
21 /*
22  * ao_led.c
23  */
24
25 #define AO_LED_NONE     0
26
27 #ifndef AO_LED_TYPE
28 #define AO_LED_TYPE uint8_t
29 #endif
30
31 /* Turn on the specified LEDs */
32 void
33 ao_led_on(AO_LED_TYPE colors);
34
35 /* Turn off the specified LEDs */
36 void
37 ao_led_off(AO_LED_TYPE colors);
38
39 /* Set all of the LEDs to the specified state */
40 void
41 ao_led_set(AO_LED_TYPE colors);
42
43 /* Set all LEDs in 'mask' to the specified state */
44 void
45 ao_led_set_mask(uint8_t colors, uint8_t mask);
46
47 /* Toggle the specified LEDs */
48 void
49 ao_led_toggle(AO_LED_TYPE colors);
50
51 /* Turn on the specified LEDs for the indicated interval */
52 void
53 ao_led_for(AO_LED_TYPE colors, uint16_t ticks) __reentrant;
54
55 /* Initialize the LEDs */
56 void
57 ao_led_init(AO_LED_TYPE enable);
58
59 #endif /* _AO_LED_H_ */