| 
 | 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_ELECTRONUT_BLUEY_  | 
 | 18 | +#define _VARIANT_ELECTRONUT_BLUEY_  | 
 | 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           (27u)  | 
 | 36 | +#define NUM_DIGITAL_PINS     (27u)  | 
 | 37 | +#define NUM_ANALOG_INPUTS    (7u)  | 
 | 38 | +#define NUM_ANALOG_OUTPUTS   (0u)  | 
 | 39 | + | 
 | 40 | +// LEDs  | 
 | 41 | +#define PIN_LEDR               (7)  | 
 | 42 | +#define PIN_LEDG               (8)  | 
 | 43 | +#define PIN_LEDB               (9)  | 
 | 44 | +#define LED_BUILTIN            PIN_LEDR  | 
 | 45 | + | 
 | 46 | +// Buttons  | 
 | 47 | +#define PIN_BUTTON             (6)  | 
 | 48 | + | 
 | 49 | +/*  | 
 | 50 | + * Analog pins  | 
 | 51 | + */  | 
 | 52 | +#define PIN_A0               (16)  | 
 | 53 | +#define PIN_A1               (17)  | 
 | 54 | +#define PIN_A2               (18)  | 
 | 55 | +#define PIN_A3               (19)  | 
 | 56 | +#define PIN_A4               (20)  | 
 | 57 | +#define PIN_A5               (21)  | 
 | 58 | +#define PIN_A6               (22)  | 
 | 59 | + | 
 | 60 | +static const uint8_t A0  = PIN_A0 ; // AIN0 / AREF / P0.02  | 
 | 61 | +static const uint8_t A1  = PIN_A1 ; // AIN1  | 
 | 62 | +static const uint8_t A2  = PIN_A2 ; // AIN2  | 
 | 63 | +static const uint8_t A3  = PIN_A3 ; // AIN4  | 
 | 64 | +static const uint8_t A4  = PIN_A4 ; // AIN5  | 
 | 65 | +static const uint8_t A5  = PIN_A5 ; // AIN6  | 
 | 66 | +static const uint8_t A6  = PIN_A6 ; // AIN7  | 
 | 67 | +#define ADC_RESOLUTION    10  | 
 | 68 | + | 
 | 69 | +// Other pins  | 
 | 70 | +#define PIN_AREF           (16)  | 
 | 71 | +static const uint8_t AREF = PIN_AREF;  | 
 | 72 | + | 
 | 73 | +/*  | 
 | 74 | + * Serial interfaces  | 
 | 75 | + */  | 
 | 76 | +// Serial  | 
 | 77 | +#define PIN_SERIAL_RX       (23)  | 
 | 78 | +#define PIN_SERIAL_TX       (24)  | 
 | 79 | + | 
 | 80 | +/*  | 
 | 81 | + * SPI Interfaces  | 
 | 82 | + */  | 
 | 83 | +#define SPI_INTERFACES_COUNT 1  | 
 | 84 | + | 
 | 85 | +#define PIN_SPI_MISO         (4)  | 
 | 86 | +#define PIN_SPI_MOSI         (3)  | 
 | 87 | +#define PIN_SPI_SCK          (5)  | 
 | 88 | + | 
 | 89 | +static const uint8_t SS   = 2 ;  | 
 | 90 | +static const uint8_t MOSI = PIN_SPI_MOSI ;  | 
 | 91 | +static const uint8_t MISO = PIN_SPI_MISO ;  | 
 | 92 | +static const uint8_t SCK  = PIN_SPI_SCK ;  | 
 | 93 | + | 
 | 94 | +/*  | 
 | 95 | + * Wire Interfaces  | 
 | 96 | + */  | 
 | 97 | +#define WIRE_INTERFACES_COUNT 1  | 
 | 98 | + | 
 | 99 | +#define PIN_WIRE_SDA         (12u)  | 
 | 100 | +#define PIN_WIRE_SCL         (10u)  | 
 | 101 | + | 
 | 102 | +#ifdef __cplusplus  | 
 | 103 | +}  | 
 | 104 | +#endif  | 
 | 105 | + | 
 | 106 | +/*----------------------------------------------------------------------------  | 
 | 107 | + *        Arduino objects - C++ only  | 
 | 108 | + *----------------------------------------------------------------------------*/  | 
 | 109 | + | 
 | 110 | +#endif  | 
0 commit comments