2011-09-09 19:15:21 +02:00
|
|
|
/*
|
|
|
|
%atmel_license%
|
|
|
|
*/
|
|
|
|
|
2011-07-11 01:51:24 +02:00
|
|
|
#ifndef _VARIANT_
|
|
|
|
#define _VARIANT_
|
2011-06-01 01:54:47 +02:00
|
|
|
|
2011-06-21 00:48:47 +02:00
|
|
|
/*----------------------------------------------------------------------------
|
|
|
|
* Headers
|
|
|
|
*----------------------------------------------------------------------------*/
|
2011-06-01 01:54:47 +02:00
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
#include "Arduino.h"
|
|
|
|
#include "common/UART.h"
|
|
|
|
#include "common/USART.h"
|
2011-06-01 01:54:47 +02:00
|
|
|
|
2011-06-21 00:48:47 +02:00
|
|
|
/**
|
|
|
|
* Libc porting layers
|
|
|
|
*/
|
|
|
|
#if defined ( __GNUC__ ) /* GCC CS3 */
|
2011-07-11 01:51:24 +02:00
|
|
|
# include <syscalls.h> /** RedHat Newlib minimal stub */
|
2011-06-01 01:54:47 +02:00
|
|
|
#endif
|
|
|
|
|
2011-06-21 00:48:47 +02:00
|
|
|
/*----------------------------------------------------------------------------
|
|
|
|
* Definitions
|
|
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
2011-07-17 15:50:36 +02:00
|
|
|
#ifndef sam3s_ek
|
|
|
|
#define sam3s_ek
|
|
|
|
#endif
|
|
|
|
|
2011-06-21 00:48:47 +02:00
|
|
|
/** Name of the board */
|
2011-07-11 01:51:24 +02:00
|
|
|
#define VARIANT_NAME "SAM3S-EK"
|
2011-06-21 00:48:47 +02:00
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
#define VARIANT_REV_A
|
2011-09-10 23:54:56 +02:00
|
|
|
/*
|
2011-09-09 19:15:21 +02:00
|
|
|
#define VARIANT_REV_B
|
2011-09-10 23:54:56 +02:00
|
|
|
*/
|
2011-06-21 00:48:47 +02:00
|
|
|
|
|
|
|
/** Frequency of the board main oscillator */
|
2011-07-11 01:51:24 +02:00
|
|
|
#define VARIANT_MAINOSC 12000000
|
2011-06-21 00:48:47 +02:00
|
|
|
|
2011-07-11 01:51:24 +02:00
|
|
|
/** Master clock frequency */
|
|
|
|
#define VARIANT_MCK 64000000
|
2011-06-21 00:48:47 +02:00
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
/*----------------------------------------------------------------------------
|
|
|
|
* Pins
|
|
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#define PIN_LED_BLUE (0u)
|
|
|
|
#define PIN_LED_GREEN (1u)
|
|
|
|
#define PIN_LED_RED (2u)
|
|
|
|
#define PIN_LED PIN_LED_BLUE
|
|
|
|
|
|
|
|
#define PIN_DAC0 (u)
|
|
|
|
|
|
|
|
static const uint8_t SS = 34 ;
|
|
|
|
static const uint8_t MOSI = 32 ;
|
|
|
|
static const uint8_t MISO = 31 ;
|
|
|
|
static const uint8_t SCK = 33 ;
|
|
|
|
|
|
|
|
#define PINS_UART (16u)
|
|
|
|
|
|
|
|
#if defined VARIANT_REV_A
|
|
|
|
# define PIN_TSC_IRQ_WUP_ID (1UL << 3)
|
|
|
|
#elif defined VARIANT_REV_B
|
|
|
|
# define PIN_TSC_IRQ_WUP_ID (1UL << 15)
|
|
|
|
#else
|
|
|
|
#error "No board revision defined"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define BOARD_LCD_PINS PIN_EBI_DATA_BUS, PIN_EBI_NRD, PIN_EBI_NWE, PIN_EBI_NCS1, PIN_EBI_LCD_RS
|
|
|
|
#define BOARD_LCD_BASE 0x61000000 /** Define ILI9325 base address. */
|
|
|
|
#define BOARD_LCD_RS (1 << 1) /** Define ILI9325 register select signal. */
|
|
|
|
|
2011-06-21 00:48:47 +02:00
|
|
|
/*----------------------------------------------------------------------------
|
2011-07-11 01:51:24 +02:00
|
|
|
* Arduino objects - C++ only
|
2011-06-21 00:48:47 +02:00
|
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
#ifdef __cplusplus
|
2011-07-11 01:51:24 +02:00
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
extern UARTClass Serial ;
|
2011-06-21 00:48:47 +02:00
|
|
|
extern UARTClass Serial2 ;
|
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
extern USARTClass Serial3 ;
|
|
|
|
extern USARTClass Serial4 ;
|
2011-06-21 00:48:47 +02:00
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
#endif
|
2011-06-21 00:48:47 +02:00
|
|
|
|
2011-09-09 19:15:21 +02:00
|
|
|
#endif /* _VARIANT_ */
|
2011-06-21 00:48:47 +02:00
|
|
|
|