1 /* This header file is part of the ATMEL FREERTOS-0.9.0 Release */
\r
3 /*This file is prepared for Doxygen automatic documentation generation.*/
\r
4 /*! \file *********************************************************************
\r
6 * \brief AT32UC3A EVK1100 board LEDs support package.
\r
8 * This file contains definitions and services related to the LED features of
\r
11 * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
\r
12 * - Supported devices: All AVR32 AT32UC3A devices can be used.
\r
15 * \author Atmel Corporation: http://www.atmel.com \n
\r
16 * Support email: avr32@atmel.com
\r
18 ******************************************************************************/
\r
20 /* Copyright (c) 2007, Atmel Corporation All rights reserved.
\r
22 * Redistribution and use in source and binary forms, with or without
\r
23 * modification, are permitted provided that the following conditions are met:
\r
25 * 1. Redistributions of source code must retain the above copyright notice,
\r
26 * this list of conditions and the following disclaimer.
\r
28 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
29 * this list of conditions and the following disclaimer in the documentation
\r
30 * and/or other materials provided with the distribution.
\r
32 * 3. The name of ATMEL may not be used to endorse or promote products derived
\r
33 * from this software without specific prior written permission.
\r
35 * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
\r
36 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
37 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
\r
38 * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
\r
39 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
\r
41 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
\r
42 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
43 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
\r
44 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
51 #include "compiler.h"
\r
54 /*! \name Identifiers of LEDs to Use with LED Functions
\r
68 /*! \brief Gets the last state of all LEDs set through the LED API.
\r
70 * \return State of all LEDs (1 bit per LED).
\r
72 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
74 extern U32 LED_Read_Display(void);
\r
76 /*! \brief Sets the state of all LEDs.
\r
78 * \param leds New state of all LEDs (1 bit per LED).
\r
80 * \note The pins of all LEDs are set to GPIO output mode.
\r
82 extern void LED_Display(U32 leds);
\r
84 /*! \brief Gets the last state of the specified LEDs set through the LED API.
\r
86 * \param mask LEDs of which to get the state (1 bit per LED).
\r
88 * \return State of the specified LEDs (1 bit per LED).
\r
90 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
92 extern U32 LED_Read_Display_Mask(U32 mask);
\r
94 /*! \brief Sets the state of the specified LEDs.
\r
96 * \param mask LEDs of which to set the state (1 bit per LED).
\r
98 * \param leds New state of the specified LEDs (1 bit per LED).
\r
100 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
102 extern void LED_Display_Mask(U32 mask, U32 leds);
\r
104 /*! \brief Tests the last state of the specified LEDs set through the LED API.
\r
106 * \param leds LEDs of which to test the state (1 bit per LED).
\r
108 * \return \c TRUE if at least one of the specified LEDs has a state on, else
\r
111 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
113 extern Bool LED_Test(U32 leds);
\r
115 /*! \brief Turns off the specified LEDs.
\r
117 * \param leds LEDs to turn off (1 bit per LED).
\r
119 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
121 extern void LED_Off(U32 leds);
\r
123 /*! \brief Turns on the specified LEDs.
\r
125 * \param leds LEDs to turn on (1 bit per LED).
\r
127 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
129 extern void LED_On(U32 leds);
\r
131 /*! \brief Toggles the specified LEDs.
\r
133 * \param leds LEDs to toggle (1 bit per LED).
\r
135 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
137 extern void LED_Toggle(U32 leds);
\r
139 /*! \brief Gets as a bit-field the last state of the specified LEDs set through
\r
142 * \param field LEDs of which to get the state (1 bit per LED).
\r
144 * \return State of the specified LEDs (1 bit per LED, beginning with the first
\r
147 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
149 extern U32 LED_Read_Display_Field(U32 field);
\r
151 /*! \brief Sets as a bit-field the state of the specified LEDs.
\r
153 * \param field LEDs of which to set the state (1 bit per LED).
\r
154 * \param leds New state of the specified LEDs (1 bit per LED, beginning with
\r
155 * the first specified LED).
\r
157 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
159 extern void LED_Display_Field(U32 field, U32 leds);
\r
161 /*! \brief Gets the intensity of the specified LED.
\r
163 * \param led LED of which to get the intensity (1 bit per LED; only the least
\r
164 * significant set bit is used).
\r
166 * \return Intensity of the specified LED (0x00 to 0xFF).
\r
168 * \warning The PWM channel of the specified LED is supposed to be used only by
\r
171 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
173 extern U8 LED_Get_Intensity(U32 led);
\r
175 /*! \brief Sets the intensity of the specified LEDs.
\r
177 * \param leds LEDs of which to set the intensity (1 bit per LED).
\r
178 * \param intensity New intensity of the specified LEDs (0x00 to 0xFF).
\r
180 * \warning The PWM channels of the specified LEDs are supposed to be used only
\r
183 * \note The pins of the specified LEDs are set to PWM output mode.
\r
185 extern void LED_Set_Intensity(U32 leds, U8 intensity);
\r