MAV'RIC
led.h
Go to the documentation of this file.
1 /*This file is prepared for Doxygen automatic documentation generation.*/
18 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
19  *
20  * Redistribution and use in source and binary forms, with or without
21  * modification, are permitted provided that the following conditions are met:
22  *
23  * 1. Redistributions of source code must retain the above copyright notice, this
24  * list of conditions and the following disclaimer.
25  *
26  * 2. Redistributions in binary form must reproduce the above copyright notice,
27  * this list of conditions and the following disclaimer in the documentation
28  * and/or other materials provided with the distribution.
29  *
30  * 3. The name of Atmel may not be used to endorse or promote products derived
31  * from this software without specific prior written permission.
32  *
33  * 4. This software may only be redistributed and used in connection with an Atmel
34  * AVR product.
35  *
36  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
38  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
39  * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
40  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
41  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
42  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
44  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
45  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
46  *
47  */
48 
49 #ifndef _LED_H_
50 #define _LED_H_
51 
52 #ifdef __cplusplus
53  extern "C" {
54 #endif
55 
56 #include "compiler.h"
57 
58 
61 #define LED0 0x01
63 #define LED1 0x02
64 #define LED2 0x04
65 #define LED3 0x08
66 
68 
75 extern U32 LED_Read_Display(void);
76 
83 extern void LED_Display(U32 leds);
84 
93 extern U32 LED_Read_Display_Mask(U32 mask);
94 
103 extern void LED_Display_Mask(U32 mask, U32 leds);
104 
114 extern bool LED_Test(U32 leds);
115 
122 extern void LED_Off(U32 leds);
123 
130 extern void LED_On(U32 leds);
131 
138 extern void LED_Toggle(U32 leds);
139 
150 extern U32 LED_Read_Display_Field(U32 field);
151 
160 extern void LED_Display_Field(U32 field, U32 leds);
161 
174 extern U8 LED_Get_Intensity(U32 led);
175 
186 extern void LED_Set_Intensity(U32 leds, U8 intensity);
187 
188 #ifdef __cplusplus
189  }
190 #endif
191 
192 #endif // _LED_H_
void LED_On(U32 leds)
Turns on the specified LEDs.
Definition: led.c:179
void LED_Set_Intensity(U32 leds, U8 intensity)
Sets the intensity of the specified LEDs.
Definition: led.c:284
U32 LED_Read_Display_Field(U32 field)
Gets as a bit-field the last state of the specified LEDs set through the LED API. ...
Definition: led.c:264
void LED_Off(U32 leds)
Turns off the specified LEDs.
Definition: led.c:208
void LED_Display_Mask(U32 mask, U32 leds)
Sets the state of the specified LEDs.
Definition: led.c:135
U32 LED_Read_Display(void)
Gets the last state of all LEDs set through the LED API.
Definition: led.c:89
void LED_Display_Field(U32 field, U32 leds)
Sets as a bit-field the state of the specified LEDs.
Definition: led.c:270
void LED_Display(U32 leds)
Sets the state of all LEDs.
Definition: led.c:95
U32 LED_Read_Display_Mask(U32 mask)
Gets the last state of the specified LEDs set through the LED API.
Definition: led.c:129
void LED_Toggle(U32 leds)
Toggles the specified LEDs.
Definition: led.c:236
U8 LED_Get_Intensity(U32 led)
Gets the intensity of the specified LED.
Definition: led.c:277
bool LED_Test(U32 leds)
Tests the last state of the specified LEDs set through the LED API.
Definition: led.c:172