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