Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
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 #ifdef USE_LED_BODY
78  LED_INIT(BODY);
79  LED_OFF(BODY);
80 #endif /* LED_BODY */
81 
82 #if USE_LED_12
83  LED_INIT(12);
84  LED_OFF(12);
85 #endif /* LED_12 */
86 }
87 
88 #else /* USE_LED */
89 static inline void led_init ( void ) {}
90 #define LED_ON(i) {}
91 #define LED_OFF(i) {}
92 #define LED_TOGGLE(i) {}
93 #define LED_PERIODIC() {}
94 #endif /* USE_LED */
95 
96 #endif /* LED_H */
#define LED_OFF(i)
Definition: led.h:91
static void led_init(void)
Definition: led.h:89
#define LED_INIT(i)
Definition: led_hw.h:26