source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/hardware/arduino/avr/firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/BOARDS/ARDUINO/arduino.h @ 46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 8.5 KB
Line 
1/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
2
3/*This file is prepared for Doxygen automatic documentation generation.*/
4/*! \file *********************************************************************
5 *
6 * \brief AT32UC3A EVK1100 board header file.
7 *
8 * This file contains definitions and services related to the features of the
9 * EVK1100 board rev. B and C.
10 *
11 * To use this board, define BOARD=EVK1100.
12 *
13 * - Compiler:           IAR EWAVR32 and GNU GCC for AVR32
14 * - Supported devices:  All AVR32 AT32UC3A devices can be used.
15 * - AppNote:
16 *
17 * \author               Atmel Corporation: http://www.atmel.com \n
18 *                       Support and FAQ: http://support.atmel.no/
19 *
20 ******************************************************************************/
21
22/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
23 *
24 * Redistribution and use in source and binary forms, with or without
25 * modification, are permitted provided that the following conditions are met:
26 *
27 * 1. Redistributions of source code must retain the above copyright notice, this
28 * list of conditions and the following disclaimer.
29 *
30 * 2. Redistributions in binary form must reproduce the above copyright notice,
31 * this list of conditions and the following disclaimer in the documentation
32 * and/or other materials provided with the distribution.
33 *
34 * 3. The name of Atmel may not be used to endorse or promote products derived
35 * from this software without specific prior written permission.
36 *
37 * 4. This software may only be redistributed and used in connection with an Atmel
38 * AVR product.
39 *
40 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
41 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
42 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
43 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
44 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
45 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
47 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
50 *
51 */
52
53#ifndef _ARDUINO_H_
54#define _ARDUINO_H_
55
56#include "compiler.h"
57
58#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
59#  include "led.h"
60#endif  // __AVR32_ABI_COMPILER__
61
62
63/*! \name Oscillator Definitions
64 */
65//! @{
66
67// RCOsc has no custom calibration by default. Set the following definition to
68// the appropriate value if a custom RCOsc calibration has been applied to your
69// part.
70//#define FRCOSC          AVR32_PM_RCOSC_FREQUENCY              //!< RCOsc frequency: Hz.
71
72#define FOSC32          32768                                 //!< Osc32 frequency: Hz.
73#define OSC32_STARTUP   AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC //!< Osc32 startup time: RCOsc periods.
74
75#define FOSC0           12000000                              //!< Osc0 frequency: Hz.
76#define OSC0_STARTUP    AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC  //!< Osc0 startup time: RCOsc periods.
77
78// Osc1 crystal is not mounted by default. Set the following definitions to the
79// appropriate values if a custom Osc1 crystal is mounted on your board.
80//#define FOSC1           12000000                              //!< Osc1 frequency: Hz.
81//#define OSC1_STARTUP    AVR32_PM_OSCCTRL1_STARTUP_2048_RCOSC  //!< Osc1 startup time: RCOsc periods.
82
83//! @}
84
85
86//! Number of LEDs.
87#define LED_COUNT   3
88
89/*! \name GPIO Connections of LEDs
90 */
91//! @{
92#define LED0_GPIO   AVR32_PIN_PB19
93#define LED1_GPIO   AVR32_PIN_PB20
94#define LED2_GPIO   AVR32_PIN_PB21
95//! @}
96
97/*! \name PWM Channels of LEDs
98 */
99//! @{
100#define LED0_PWM      0
101#define LED1_PWM      1
102#define LED2_PWM      2
103//! @}
104
105/*! \name PWM Functions of LEDs
106 */
107//! @{
108#define LED0_PWM_FUNCTION   AVR32_PWM_0_FUNCTION
109#define LED1_PWM_FUNCTION   AVR32_PWM_1_FUNCTION
110#define LED2_PWM_FUNCTION   AVR32_PWM_2_FUNCTION
111//! @}
112
113/*! \name Color Identifiers of LEDs to Use with LED Functions
114 */
115//! @{
116#define LED_MONO0_GREEN   LED0
117#define LED_MONO1_GREEN   LED1
118#define LED_MONO2_GREEN   LED2
119//! @}
120
121#if 0
122/*! \name SPI Connections of the DIP204 LCD
123 */
124//! @{
125#define DIP204_SPI                  (&AVR32_SPI1)
126#define DIP204_SPI_NPCS             2
127#define DIP204_SPI_SCK_PIN          AVR32_SPI1_SCK_0_0_PIN
128#define DIP204_SPI_SCK_FUNCTION     AVR32_SPI1_SCK_0_0_FUNCTION
129#define DIP204_SPI_MISO_PIN         AVR32_SPI1_MISO_0_0_PIN
130#define DIP204_SPI_MISO_FUNCTION    AVR32_SPI1_MISO_0_0_FUNCTION
131#define DIP204_SPI_MOSI_PIN         AVR32_SPI1_MOSI_0_0_PIN
132#define DIP204_SPI_MOSI_FUNCTION    AVR32_SPI1_MOSI_0_0_FUNCTION
133#define DIP204_SPI_NPCS_PIN         AVR32_SPI1_NPCS_2_0_PIN
134#define DIP204_SPI_NPCS_FUNCTION    AVR32_SPI1_NPCS_2_0_FUNCTION
135//! @}
136
137/*! \name GPIO and PWM Connections of the DIP204 LCD Backlight
138 */
139//! @{
140#define DIP204_BACKLIGHT_PIN        AVR32_PIN_PB18
141#define DIP204_PWM_CHANNEL          6
142#define DIP204_PWM_PIN              AVR32_PWM_6_PIN
143#define DIP204_PWM_FUNCTION         AVR32_PWM_6_FUNCTION
144//! @}
145#endif
146
147/*! \name SPI Connections of the AT45DBX Data Flash Memory
148 */
149//! @{
150#define AT45DBX_SPI                 (&AVR32_SPI1)
151#define AT45DBX_SPI_NPCS            2
152#define AT45DBX_SPI_SCK_PIN         AVR32_SPI1_SCK_0_0_PIN
153#define AT45DBX_SPI_SCK_FUNCTION    AVR32_SPI1_SCK_0_0_FUNCTION
154#define AT45DBX_SPI_MISO_PIN        AVR32_SPI1_MISO_0_0_PIN
155#define AT45DBX_SPI_MISO_FUNCTION   AVR32_SPI1_MISO_0_0_FUNCTION
156#define AT45DBX_SPI_MOSI_PIN        AVR32_SPI1_MOSI_0_0_PIN
157#define AT45DBX_SPI_MOSI_FUNCTION   AVR32_SPI1_MOSI_0_0_FUNCTION
158#define AT45DBX_SPI_NPCS2_PIN       AVR32_SPI1_NPCS_2_0_PIN
159#define AT45DBX_SPI_NPCS2_FUNCTION  AVR32_SPI1_NPCS_2_0_FUNCTION
160#define AT45DBX_CHIP_RESET              AVR32_PIN_PA02
161//! @}
162
163
164/*! \name GPIO and SPI Connections of the SD/MMC Connector
165 */
166//! @{
167//#define SD_MMC_CARD_DETECT_PIN      AVR32_PIN_PA02
168//#define SD_MMC_WRITE_PROTECT_PIN    AVR32_PIN_PA07
169#define SD_MMC_SPI                  (&AVR32_SPI1)
170#define SD_MMC_SPI_NPCS             1
171#define SD_MMC_SPI_SCK_PIN          AVR32_SPI1_SCK_0_0_PIN
172#define SD_MMC_SPI_SCK_FUNCTION     AVR32_SPI1_SCK_0_0_FUNCTION
173#define SD_MMC_SPI_MISO_PIN         AVR32_SPI1_MISO_0_0_PIN
174#define SD_MMC_SPI_MISO_FUNCTION    AVR32_SPI1_MISO_0_0_FUNCTION
175#define SD_MMC_SPI_MOSI_PIN         AVR32_SPI1_MOSI_0_0_PIN
176#define SD_MMC_SPI_MOSI_FUNCTION    AVR32_SPI1_MOSI_0_0_FUNCTION
177#define SD_MMC_SPI_NPCS_PIN         AVR32_SPI1_NPCS_1_0_PIN
178#define SD_MMC_SPI_NPCS_FUNCTION    AVR32_SPI1_NPCS_1_0_FUNCTION
179//! @}
180
181/*      Timer Counter to generate clock for WiFi chip*/
182#  define WIFI_TC                    (&AVR32_TC)
183#  define WIFI_TC_CHANNEL_ID         0
184#  define WIFI_TC_CHANNEL_PIN        AVR32_TC_A0_0_0_PIN
185#  define WIFI_TC_CHANNEL_FUNCTION   AVR32_TC_A0_0_0_FUNCTION
186// Note that TC_A0_0_0 pin is pin 6 (PB23) on AT32UC3A1512 QFP100.
187
188/* Pin related to WiFi chip communication */
189#ifndef USE_POLL
190 #define USE_POLL
191#endif
192 #define SPI_CS                                         0
193 #define AVR32_SPI                                      AVR32_SPI1
194 #define GPIO_IRQ_PIN                           AVR32_PIN_PA03
195 #define GPIO_IRQ                                       AVR32_GPIO_IRQ_7
196 #define GPIO_W_RESET_PIN                       AVR32_PIN_PA07
197 #define GPIO_W_SHUTDOWN_PIN            AVR32_PIN_PA09
198
199/* Pin related to shield communication */
200 #define ARDUINO_HANDSHAKE_PIN          AVR32_PIN_PA25
201
202 #define AVR32_PDCA_PID_TX                      AVR32_PDCA_PID_SPI1_TX
203 #define AVR32_PDCA_PID_RX                      AVR32_PDCA_PID_SPI1_RX
204
205
206#if 0
207/*! \name TWI Connections of the Spare TWI Connector
208 */
209//! @{
210#define SPARE_TWI                   (&AVR32_TWI)
211#define SPARE_TWI_SCL_PIN           AVR32_TWI_SCL_0_0_PIN
212#define SPARE_TWI_SCL_FUNCTION      AVR32_TWI_SCL_0_0_FUNCTION
213#define SPARE_TWI_SDA_PIN           AVR32_TWI_SDA_0_0_PIN
214#define SPARE_TWI_SDA_FUNCTION      AVR32_TWI_SDA_0_0_FUNCTION
215//! @}
216
217
218/*! \name SPI Connections of the Spare SPI Connector
219 */
220//! @{
221#define SPARE_SPI                   (&AVR32_SPI0)
222#define SPARE_SPI_NPCS              0
223#define SPARE_SPI_SCK_PIN           AVR32_SPI0_SCK_0_0_PIN
224#define SPARE_SPI_SCK_FUNCTION      AVR32_SPI0_SCK_0_0_FUNCTION
225#define SPARE_SPI_MISO_PIN          AVR32_SPI0_MISO_0_0_PIN
226#define SPARE_SPI_MISO_FUNCTION     AVR32_SPI0_MISO_0_0_FUNCTION
227#define SPARE_SPI_MOSI_PIN          AVR32_SPI0_MOSI_0_0_PIN
228#define SPARE_SPI_MOSI_FUNCTION     AVR32_SPI0_MOSI_0_0_FUNCTION
229#define SPARE_SPI_NPCS_PIN          AVR32_SPI0_NPCS_0_0_PIN
230#define SPARE_SPI_NPCS_FUNCTION     AVR32_SPI0_NPCS_0_0_FUNCTION
231//! @}
232#endif
233
234#endif  // _ARDUINO_H_
Note: See TracBrowser for help on using the repository browser.