]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/lwIP_AVR32_UC3/BOARDS/EVK1101/evk1101.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / lwIP_AVR32_UC3 / BOARDS / EVK1101 / evk1101.h
1 /*This file is prepared for Doxygen automatic documentation generation.*/\r
2 /*! \file *********************************************************************\r
3  *\r
4  * \brief AT32UC3B EVK1101 board header file.\r
5  *\r
6  * This file contains definitions and services related to the features of the\r
7  * EVK1101 board.\r
8  *\r
9  * - Compiler:           IAR EWAVR32 and GNU GCC for AVR32\r
10  * - Supported devices:  All AVR32 AT32UC3B devices can be used.\r
11  * - AppNote:\r
12  *\r
13  * \author               Atmel Corporation: http://www.atmel.com \n\r
14  *                       Support and FAQ: http://support.atmel.no/\r
15  *\r
16  ******************************************************************************/\r
17 \r
18 /* Copyright (c) 2007, Atmel Corporation All rights reserved.\r
19  *\r
20  * Redistribution and use in source and binary forms, with or without\r
21  * modification, are permitted provided that the following conditions are met:\r
22  *\r
23  * 1. Redistributions of source code must retain the above copyright notice,\r
24  * this list of conditions and the following disclaimer.\r
25  *\r
26  * 2. Redistributions in binary form must reproduce the above copyright notice,\r
27  * this list of conditions and the following disclaimer in the documentation\r
28  * and/or other materials provided with the distribution.\r
29  *\r
30  * 3. The name of ATMEL may not be used to endorse or promote products derived\r
31  * from this software without specific prior written permission.\r
32  *\r
33  * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
34  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
35  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
36  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
37  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
38  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
39  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
40  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
41  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
42  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
43  */\r
44 \r
45 \r
46 #ifndef _EVK1101_H_\r
47 #define _EVK1101_H_\r
48 \r
49 #include "compiler.h"\r
50 \r
51 #ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.\r
52 #  include "led.h"\r
53 #endif  // __AVR32_ABI_COMPILER__\r
54 \r
55 \r
56 /*! \name Oscillator Definitions\r
57  */\r
58 //! @{\r
59 \r
60 // RCOsc has no custom calibration by default. Set the following definition to\r
61 // the appropriate value if a custom RCOsc calibration has been applied to your\r
62 // part.\r
63 //#define FRCOSC          115200    //!< RCOsc frequency: Hz.\r
64 \r
65 #define FOSC32          32768     //!< Osc32 frequency: Hz.\r
66 #define OSC32_STARTUP   3         //!< Osc32 startup time: RCOsc periods.\r
67 \r
68 #define FOSC0           12000000  //!< Osc0 frequency: Hz.\r
69 #define OSC0_STARTUP    3         //!< Osc0 startup time: RCOsc periods.\r
70 \r
71 // Osc1 crystal is not mounted by default. Set the following definitions to the\r
72 // appropriate values if a custom Osc1 crystal is mounted on your board.\r
73 //#define FOSC1           12000000  //!< Osc1 frequency: Hz.\r
74 //#define OSC1_STARTUP    3         //!< Osc1 startup time: RCOsc periods.\r
75 \r
76 //! @}\r
77 \r
78 \r
79 /*! \name USB Definitions\r
80  */\r
81 //! @{\r
82 \r
83 //! Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x.\r
84 //! To be selected according to the AVR32_USBB_USB_ID_x_x_PIN and\r
85 //! AVR32_USBB_USB_ID_x_x_FUNCTION definitions from <avr32/uc3bxxxx.h>.\r
86 #define USB_ID                      AVR32_USBB_USB_ID_0_0\r
87 \r
88 //! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.\r
89 //! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and\r
90 //! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3bxxxx.h>.\r
91 #define USB_VBOF                    AVR32_USBB_USB_VBOF_0_0\r
92 \r
93 //! Active level of the USB_VBOF output pin.\r
94 #define USB_VBOF_ACTIVE_LEVEL       LOW\r
95 \r
96 //! USB overcurrent detection pin.\r
97 #define USB_OVERCURRENT_DETECT_PIN  AVR32_PIN_PA20\r
98 \r
99 //! @}\r
100 \r
101 \r
102 //! Number of LEDs.\r
103 #define LED_COUNT   4\r
104 \r
105 /*! \name GPIO Connections of LEDs\r
106  */\r
107 //! @{\r
108 #define LED0_GPIO   AVR32_PIN_PA07\r
109 #define LED1_GPIO   AVR32_PIN_PA08\r
110 #define LED2_GPIO   AVR32_PIN_PA21\r
111 #define LED3_GPIO   AVR32_PIN_PA22\r
112 //! @}\r
113 \r
114 /*! \name PWM Channels of LEDs\r
115  */\r
116 //! @{\r
117 #define LED0_PWM    0\r
118 #define LED1_PWM    1\r
119 #define LED2_PWM    2\r
120 #define LED3_PWM    6\r
121 //! @}\r
122 \r
123 /*! \name PWM Functions of LEDs\r
124  */\r
125 //! @{\r
126 #define LED0_PWM_FUNCTION   AVR32_PWM_PWM_0_0_FUNCTION\r
127 #define LED1_PWM_FUNCTION   AVR32_PWM_PWM_1_0_FUNCTION\r
128 #define LED2_PWM_FUNCTION   AVR32_PWM_PWM_2_0_FUNCTION\r
129 #define LED3_PWM_FUNCTION   AVR32_PWM_PWM_6_0_FUNCTION\r
130 //! @}\r
131 \r
132 /*! \name Color Identifiers of LEDs to Use with LED Functions\r
133  */\r
134 //! @{\r
135 #define LED_MONO0_GREEN   LED0\r
136 #define LED_MONO1_GREEN   LED1\r
137 #define LED_MONO2_GREEN   LED2\r
138 #define LED_MONO3_GREEN   LED3\r
139 //! @}\r
140 \r
141 \r
142 /*! \name GPIO Connections of Push Buttons\r
143  */\r
144 //! @{\r
145 #define GPIO_PUSH_BUTTON_0    AVR32_PIN_PB02\r
146 #define GPIO_PUSH_BUTTON_1    AVR32_PIN_PB03\r
147 //! @}\r
148 \r
149 \r
150 /*! \name GPIO Connections of the Joystick\r
151  */\r
152 //! @{\r
153 #define GPIO_JOYSTICK_PUSH    AVR32_PIN_PA13\r
154 #define GPIO_JOYSTICK_LEFT    AVR32_PIN_PB06\r
155 #define GPIO_JOYSTICK_RIGHT   AVR32_PIN_PB09\r
156 #define GPIO_JOYSTICK_UP      AVR32_PIN_PB07\r
157 #define GPIO_JOYSTICK_DOWN    AVR32_PIN_PB08\r
158 //! @}\r
159 \r
160 \r
161 /*! \name ADC Connection of the Temperature Sensor\r
162  */\r
163 //! @{\r
164 #define ADC_TEMPERATURE_CHANNEL     7\r
165 #define ADC_TEMPERATURE_PIN         AVR32_ADC_AD_7_PIN\r
166 #define ADC_TEMPERATURE_FUNCTION    AVR32_ADC_AD_7_FUNCTION\r
167 //! @}\r
168 \r
169 \r
170 /*! \name ADC Connection of the Light Sensor\r
171  */\r
172 //! @{\r
173 #define ADC_LIGHT_CHANNEL           6\r
174 #define ADC_LIGHT_PIN               AVR32_ADC_AD_6_PIN\r
175 #define ADC_LIGHT_FUNCTION          AVR32_ADC_AD_6_FUNCTION\r
176 //! @}\r
177 \r
178 \r
179 /*! \name ADC Connections of the Accelerometer\r
180  */\r
181 //! @{\r
182 #define ADC_ACC_X_CHANNEL           1\r
183 #define ADC_ACC_X_PIN               AVR32_ADC_AD_1_PIN\r
184 #define ADC_ACC_X_FUNCTION          AVR32_ADC_AD_1_FUNCTION\r
185 #define ADC_ACC_Y_CHANNEL           2\r
186 #define ADC_ACC_Y_PIN               AVR32_ADC_AD_2_PIN\r
187 #define ADC_ACC_Y_FUNCTION          AVR32_ADC_AD_2_FUNCTION\r
188 #define ADC_ACC_Z_CHANNEL           3\r
189 #define ADC_ACC_Z_PIN               AVR32_ADC_AD_3_PIN\r
190 #define ADC_ACC_Z_FUNCTION          AVR32_ADC_AD_3_FUNCTION\r
191 //! @}\r
192 \r
193 \r
194 /*! \name PWM Connections of Audio\r
195  */\r
196 //! @{\r
197 #define AUDIO_LOW_PWM_CHANNEL       5\r
198 #define AUDIO_LOW_PWM_PIN           AVR32_PWM_PWM_5_0_PIN\r
199 #define AUDIO_LOW_PWM_FUNCTION      AVR32_PWM_PWM_5_0_FUNCTION\r
200 #define AUDIO_HIGH_PWM_CHANNEL      6\r
201 #define AUDIO_HIGH_PWM_PIN          AVR32_PWM_PWM_6_1_PIN\r
202 #define AUDIO_HIGH_PWM_FUNCTION     AVR32_PWM_PWM_6_1_FUNCTION\r
203 //! @}\r
204 \r
205 \r
206 /*! \name SPI Connections of the AT45DBX Data Flash Memory\r
207  */\r
208 //! @{\r
209 #define AT45DBX_SPI                 (&AVR32_SPI)\r
210 #define AT45DBX_SPI_SCK_PIN         AVR32_SPI_SCK_0_0_PIN\r
211 #define AT45DBX_SPI_SCK_FUNCTION    AVR32_SPI_SCK_0_0_FUNCTION\r
212 #define AT45DBX_SPI_MISO_PIN        AVR32_SPI_MISO_0_0_PIN\r
213 #define AT45DBX_SPI_MISO_FUNCTION   AVR32_SPI_MISO_0_0_FUNCTION\r
214 #define AT45DBX_SPI_MOSI_PIN        AVR32_SPI_MOSI_0_0_PIN\r
215 #define AT45DBX_SPI_MOSI_FUNCTION   AVR32_SPI_MOSI_0_0_FUNCTION\r
216 #define AT45DBX_SPI_NPCS0_PIN       AVR32_SPI_NPCS_0_0_PIN\r
217 #define AT45DBX_SPI_NPCS0_FUNCTION  AVR32_SPI_NPCS_0_0_FUNCTION\r
218 //! @}\r
219 \r
220 \r
221 /*! \name GPIO and SPI Connections of the SD/MMC Connector\r
222  */\r
223 //! @{\r
224 #define SD_MMC_CARD_DETECT_PIN      AVR32_PIN_PB00\r
225 #define SD_MMC_WRITE_PROTECT_PIN    AVR32_PIN_PB01\r
226 #define SD_MMC_SPI                  (&AVR32_SPI)\r
227 #define SD_MMC_SPI_CS               1\r
228 #define SD_MMC_SPI_SCK_PIN          AVR32_SPI_SCK_0_0_PIN\r
229 #define SD_MMC_SPI_SCK_FUNCTION     AVR32_SPI_SCK_0_0_FUNCTION\r
230 #define SD_MMC_SPI_MISO_PIN         AVR32_SPI_MISO_0_0_PIN\r
231 #define SD_MMC_SPI_MISO_FUNCTION    AVR32_SPI_MISO_0_0_FUNCTION\r
232 #define SD_MMC_SPI_MOSI_PIN         AVR32_SPI_MOSI_0_0_PIN\r
233 #define SD_MMC_SPI_MOSI_FUNCTION    AVR32_SPI_MOSI_0_0_FUNCTION\r
234 #define SD_MMC_SPI_NPCS_PIN         AVR32_SPI_NPCS_1_0_PIN\r
235 #define SD_MMC_SPI_NPCS_FUNCTION    AVR32_SPI_NPCS_1_0_FUNCTION\r
236 //! @}\r
237 \r
238 \r
239 #endif  // _EVK1101_H_\r