1 /* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.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 and FAQ: http://support.atmel.no/
\r
18 ******************************************************************************/
\r
20 /* Copyright (c) 2009 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, this
\r
26 * 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 * 4. This software may only be redistributed and used in connection with an Atmel
\r
38 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
\r
39 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
40 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
\r
41 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
\r
42 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
43 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
\r
44 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
\r
45 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
46 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
\r
47 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
\r
54 #include "compiler.h"
\r
57 /*! \name Identifiers of LEDs to Use with LED Functions
\r
71 /*! \brief Gets the last state of all LEDs set through the LED API.
\r
73 * \return State of all LEDs (1 bit per LED).
\r
75 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
77 extern U32 LED_Read_Display(void);
\r
79 /*! \brief Sets the state of all LEDs.
\r
81 * \param leds New state of all LEDs (1 bit per LED).
\r
83 * \note The pins of all LEDs are set to GPIO output mode.
\r
85 extern void LED_Display(U32 leds);
\r
87 /*! \brief Gets the last state of the specified LEDs set through the LED API.
\r
89 * \param mask LEDs of which to get the state (1 bit per LED).
\r
91 * \return State of the specified LEDs (1 bit per LED).
\r
93 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
95 extern U32 LED_Read_Display_Mask(U32 mask);
\r
97 /*! \brief Sets the state of the specified LEDs.
\r
99 * \param mask LEDs of which to set the state (1 bit per LED).
\r
101 * \param leds New state of the specified LEDs (1 bit per LED).
\r
103 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
105 extern void LED_Display_Mask(U32 mask, U32 leds);
\r
107 /*! \brief Tests the last state of the specified LEDs set through the LED API.
\r
109 * \param leds LEDs of which to test the state (1 bit per LED).
\r
111 * \return \c TRUE if at least one of the specified LEDs has a state on, else
\r
114 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
116 extern Bool LED_Test(U32 leds);
\r
118 /*! \brief Turns off the specified LEDs.
\r
120 * \param leds LEDs to turn off (1 bit per LED).
\r
122 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
124 extern void LED_Off(U32 leds);
\r
126 /*! \brief Turns on the specified LEDs.
\r
128 * \param leds LEDs to turn on (1 bit per LED).
\r
130 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
132 extern void LED_On(U32 leds);
\r
134 /*! \brief Toggles the specified LEDs.
\r
136 * \param leds LEDs to toggle (1 bit per LED).
\r
138 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
140 extern void LED_Toggle(U32 leds);
\r
142 /*! \brief Gets as a bit-field the last state of the specified LEDs set through
\r
145 * \param field LEDs of which to get the state (1 bit per LED).
\r
147 * \return State of the specified LEDs (1 bit per LED, beginning with the first
\r
150 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
152 extern U32 LED_Read_Display_Field(U32 field);
\r
154 /*! \brief Sets as a bit-field the state of the specified LEDs.
\r
156 * \param field LEDs of which to set the state (1 bit per LED).
\r
157 * \param leds New state of the specified LEDs (1 bit per LED, beginning with
\r
158 * the first specified LED).
\r
160 * \note The pins of the specified LEDs are set to GPIO output mode.
\r
162 extern void LED_Display_Field(U32 field, U32 leds);
\r
164 /*! \brief Gets the intensity of the specified LED.
\r
166 * \param led LED of which to get the intensity (1 bit per LED; only the least
\r
167 * significant set bit is used).
\r
169 * \return Intensity of the specified LED (0x00 to 0xFF).
\r
171 * \warning The PWM channel of the specified LED is supposed to be used only by
\r
174 * \note The GPIO pin configuration of all LEDs is left unchanged.
\r
176 extern U8 LED_Get_Intensity(U32 led);
\r
178 /*! \brief Sets the intensity of the specified LEDs.
\r
180 * \param leds LEDs of which to set the intensity (1 bit per LED).
\r
181 * \param intensity New intensity of the specified LEDs (0x00 to 0xFF).
\r
183 * \warning The PWM channels of the specified LEDs are supposed to be used only
\r
186 * \note The pins of the specified LEDs are set to PWM output mode.
\r
188 extern void LED_Set_Intensity(U32 leds, U8 intensity);
\r