Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
led.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003-2005 Antoine Drouin
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  */
22 
29 #ifndef LED_H
30 #define LED_H
31 
32 #if defined USE_LED
33 
34 #include "led_hw.h"
35 
36 static inline void led_init ( void ) {
37 #if USE_LED_1
38  LED_INIT(1);
39  LED_OFF(1);
40 #endif /* LED_1 */
41 
42 #if USE_LED_2
43  LED_INIT(2);
44  LED_OFF(2);
45 #endif /* LED_2 */
46 
47 #if USE_LED_3
48  LED_INIT(3);
49  LED_OFF(3);
50 #endif /* LED_3 */
51 
52 #if USE_LED_4
53  LED_INIT(4);
54  LED_OFF(4);
55 #endif /* LED_4 */
56 
57 #if USE_LED_5
58  LED_INIT(5);
59  LED_OFF(5);
60 #endif /* LED_5 */
61 
62 #if USE_LED_6
63  LED_INIT(6);
64  LED_OFF(6);
65 #endif /* LED_6 */
66 
67 #if USE_LED_7
68  LED_INIT(7);
69  LED_OFF(7);
70 #endif /* LED_7 */
71 
72 #if USE_LED_8
73  LED_INIT(8);
74  LED_OFF(8);
75 #endif /* LED_8 */
76 
77 #if USE_LED_9
78  LED_INIT(9);
79  LED_OFF(9);
80 #endif /* LED_9 */
81 
82 #if USE_LED_10
83  LED_INIT(10);
84  LED_OFF(10);
85 #endif /* LED_10 */
86 
87 #ifdef USE_LED_BODY
88  LED_INIT(BODY);
89  LED_OFF(BODY);
90 #endif /* LED_BODY */
91 
92 #if USE_LED_12
93  LED_INIT(12);
94  LED_OFF(12);
95 #endif /* LED_12 */
96 }
97 
98 #else /* USE_LED */
99 static inline void led_init ( void ) {}
100 #define LED_ON(i) {}
101 #define LED_OFF(i) {}
102 #define LED_TOGGLE(i) {}
103 #define LED_PERIODIC() {}
104 #endif /* USE_LED */
105 
106 #endif /* LED_H */
static void led_init(void)
Definition: led.h:36
#define LED_INIT(i)
Definition: led_hw.h:26
#define LED_OFF(i)
Definition: led_hw.h:29