Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
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
{
38
#if USE_LED_1
39
LED_INIT
(1);
40
LED_OFF
(1);
41
#endif
/* LED_1 */
42
43
#if USE_LED_2
44
LED_INIT
(2);
45
LED_OFF
(2);
46
#endif
/* LED_2 */
47
48
#if USE_LED_3
49
LED_INIT
(3);
50
LED_OFF
(3);
51
#endif
/* LED_3 */
52
53
#if USE_LED_4
54
LED_INIT
(4);
55
LED_OFF
(4);
56
#endif
/* LED_4 */
57
58
#if USE_LED_5
59
LED_INIT
(5);
60
LED_OFF
(5);
61
#endif
/* LED_5 */
62
63
#if USE_LED_6
64
LED_INIT
(6);
65
LED_OFF
(6);
66
#endif
/* LED_6 */
67
68
#if USE_LED_7
69
LED_INIT
(7);
70
LED_OFF
(7);
71
#endif
/* LED_7 */
72
73
#if USE_LED_8
74
LED_INIT
(8);
75
LED_OFF
(8);
76
#endif
/* LED_8 */
77
78
#if USE_LED_9
79
LED_INIT
(9);
80
LED_OFF
(9);
81
#endif
/* LED_9 */
82
83
#if USE_LED_10
84
LED_INIT
(10);
85
LED_OFF
(10);
86
#endif
/* LED_10 */
87
88
#ifdef USE_LED_BODY
89
LED_INIT
(BODY);
90
LED_OFF
(BODY);
91
#endif
/* LED_BODY */
92
93
#if USE_LED_12
94
LED_INIT
(12);
95
LED_OFF
(12);
96
#endif
/* LED_12 */
97
}
98
99
#define _LED_AVAILABLE(i) USE_LED_ ## i
100
#define LED_AVAILABLE(i) _LED_AVAILABLE(i)
101
102
#else
/* USE_LED */
103
static
inline
void
led_init
(
void
) {}
104
#define LED_ON(i) {}
105
#define LED_OFF(i) {}
106
#define LED_TOGGLE(i) {}
107
#define LED_PERIODIC() {}
108
#define LED_AVAILABLE(i) 0
109
#endif
/* USE_LED */
110
111
#endif
/* LED_H */
LED_INIT
#define LED_INIT(i)
Definition:
led_hw.h:41
led_init
static void led_init(void)
Definition:
led.h:36
LED_OFF
#define LED_OFF(i)
Definition:
led_hw.h:43
sw
airborne
led.h
Generated on Tue Jun 21 2016 14:01:14 for Paparazzi UAS by
1.8.8