|
| 1 | +/* |
| 2 | + Copyright (c) 2014-2015 Arduino LLC. All right reserved. |
| 3 | + Copyright (c) 2016 Sandeep Mistry All right reserved. |
| 4 | + This library is free software; you can redistribute it and/or |
| 5 | + modify it under the terms of the GNU Lesser General Public |
| 6 | + License as published by the Free Software Foundation; either |
| 7 | + version 2.1 of the License, or (at your option) any later version. |
| 8 | + This library is distributed in the hope that it will be useful, |
| 9 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 11 | + See the GNU Lesser General Public License for more details. |
| 12 | + You should have received a copy of the GNU Lesser General Public |
| 13 | + License along with this library; if not, write to the Free Software |
| 14 | + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | +*/ |
| 16 | + |
| 17 | +#ifndef _VARIANT_REDBEAR_BLEND2_ |
| 18 | +#define _VARIANT_REDBEAR_BLEND2_ |
| 19 | + |
| 20 | +/** Master clock frequency */ |
| 21 | +#define VARIANT_MCK (64000000ul) |
| 22 | + |
| 23 | +/*---------------------------------------------------------------------------- |
| 24 | + * Headers |
| 25 | + *----------------------------------------------------------------------------*/ |
| 26 | + |
| 27 | +#include "WVariant.h" |
| 28 | + |
| 29 | +#ifdef __cplusplus |
| 30 | +extern "C" |
| 31 | +{ |
| 32 | +#endif // __cplusplus |
| 33 | + |
| 34 | +// Number of pins defined in PinDescription array |
| 35 | +#define PINS_COUNT (25u) |
| 36 | +#define NUM_DIGITAL_PINS (20u) |
| 37 | +#define NUM_ANALOG_INPUTS (6u) |
| 38 | +#define NUM_ANALOG_OUTPUTS (0u) |
| 39 | + |
| 40 | +// LEDs |
| 41 | +#define LED_BUILTIN 13 |
| 42 | + |
| 43 | +/* |
| 44 | + * Analog pins |
| 45 | + */ |
| 46 | +#define PIN_A0 (14) |
| 47 | +#define PIN_A1 (15) |
| 48 | +#define PIN_A2 (16) |
| 49 | +#define PIN_A3 (17) |
| 50 | +#define PIN_A4 (18) |
| 51 | +#define PIN_A5 (19) |
| 52 | + |
| 53 | +static const uint8_t A0 = PIN_A0 ; |
| 54 | +static const uint8_t A1 = PIN_A1 ; |
| 55 | +static const uint8_t A2 = PIN_A2 ; |
| 56 | +static const uint8_t A3 = PIN_A3 ; |
| 57 | +static const uint8_t A4 = PIN_A4 ; |
| 58 | +static const uint8_t A5 = PIN_A5 ; |
| 59 | +#define ADC_RESOLUTION 14 |
| 60 | + |
| 61 | +// Other pins |
| 62 | +#define PIN_AREF (24) |
| 63 | +static const uint8_t AREF = PIN_AREF; |
| 64 | + |
| 65 | +/* |
| 66 | + * Serial interfaces |
| 67 | + */ |
| 68 | +// Serial |
| 69 | +#define PIN_SERIAL_RX (22) |
| 70 | +#define PIN_SERIAL_TX (23) |
| 71 | + |
| 72 | +/* |
| 73 | + * SPI Interfaces |
| 74 | + */ |
| 75 | +#define SPI_INTERFACES_COUNT 1 |
| 76 | + |
| 77 | +#define PIN_SPI_MISO (12) |
| 78 | +#define PIN_SPI_MOSI (11) |
| 79 | +#define PIN_SPI_SCK (13) |
| 80 | + |
| 81 | +static const uint8_t SS = 10 ; |
| 82 | +static const uint8_t MOSI = PIN_SPI_MOSI ; |
| 83 | +static const uint8_t MISO = PIN_SPI_MISO ; |
| 84 | +static const uint8_t SCK = PIN_SPI_SCK ; |
| 85 | + |
| 86 | +/* |
| 87 | + * Wire Interfaces |
| 88 | + */ |
| 89 | +#define WIRE_INTERFACES_COUNT 1 |
| 90 | + |
| 91 | +#define PIN_WIRE_SDA (20u) |
| 92 | +#define PIN_WIRE_SCL (21u) |
| 93 | + |
| 94 | +#ifdef __cplusplus |
| 95 | +} |
| 96 | +#endif |
| 97 | + |
| 98 | +/*---------------------------------------------------------------------------- |
| 99 | + * Arduino objects - C++ only |
| 100 | + *----------------------------------------------------------------------------*/ |
| 101 | + |
| 102 | +#endif |
0 commit comments