mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-30 11:24:12 +01:00
116 lines
3.3 KiB
C
116 lines
3.3 KiB
C
/*
|
|
Copyright (c) 2011 Arduino. All right reserved.
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
See the GNU Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef _VARIANT_ARDUINO_DUE_
|
|
#define _VARIANT_ARDUINO_DUE_
|
|
|
|
/*----------------------------------------------------------------------------
|
|
* Headers
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
#include "Arduino.h"
|
|
#include "UARTClass.h"
|
|
#include "USARTClass.h"
|
|
|
|
/**
|
|
* Libc porting layers
|
|
*/
|
|
#if defined ( __GNUC__ ) /* GCC CS3 */
|
|
# include <syscalls.h> /** RedHat Newlib minimal stub */
|
|
#endif
|
|
|
|
/*----------------------------------------------------------------------------
|
|
* Definitions
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
#ifndef arduino_due
|
|
#define arduino_due
|
|
#endif
|
|
|
|
/** Name of the board */
|
|
#define VARIANT_NAME "ARDUINO_DUE"
|
|
|
|
/*
|
|
#define VARIANT_REV_A
|
|
#define VARIANT_REV_B
|
|
*/
|
|
|
|
/** Frequency of the board main oscillator */
|
|
#define VARIANT_MAINOSC 12000000
|
|
|
|
/** Master clock frequency */
|
|
#define VARIANT_MCK 96000000
|
|
|
|
/*----------------------------------------------------------------------------
|
|
* Pins
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
#define PIN_LED_13 (13u)
|
|
#define PIN_LED_RXL (73u)
|
|
#define PIN_LED_TXL (74u)
|
|
#define PIN_LED PIN_LED_13
|
|
#define PIN_LED2 PIN_LED_RXL
|
|
#define PIN_LED3 PIN_LED_TXL
|
|
|
|
#define PINS_UART (80u)
|
|
|
|
#define PINS_USART0 (81u)
|
|
#define PINS_USART1 (82u)
|
|
#define PINS_USART2 (83u)
|
|
|
|
static const uint8_t SS = 4 ;
|
|
static const uint8_t MOSI = 76 ;
|
|
static const uint8_t MISO = 75 ;
|
|
static const uint8_t SCK = 77 ;
|
|
|
|
static const uint8_t A0 = 54;
|
|
static const uint8_t A1 = 55;
|
|
static const uint8_t A2 = 56;
|
|
static const uint8_t A3 = 57;
|
|
static const uint8_t A4 = 58;
|
|
static const uint8_t A5 = 59;
|
|
static const uint8_t A6 = 60;
|
|
static const uint8_t A7 = 61;
|
|
static const uint8_t A8 = 62;
|
|
static const uint8_t A9 = 63;
|
|
static const uint8_t A10 = 64;
|
|
static const uint8_t A11 = 65;
|
|
static const uint8_t A12 = 66;
|
|
static const uint8_t A13 = 67;
|
|
// static const uint8_t A14 = ;
|
|
// static const uint8_t A15 = ;
|
|
|
|
/*----------------------------------------------------------------------------
|
|
* Arduino objects - C++ only
|
|
*----------------------------------------------------------------------------*/
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern UARTClass Serial ;
|
|
|
|
extern USARTClass Serial2 ;
|
|
extern USARTClass Serial3 ;
|
|
extern USARTClass Serial4 ;
|
|
|
|
#endif
|
|
|
|
#endif /* _VARIANT_ARDUINO_DUE_ */
|
|
|