|
| 1 | + /* |
| 2 | + Copyright (c) 2014-2015 Arduino LLC. All right reserved. |
| 3 | + Copyright (c) 2016 Sandeep Mistry All right reserved. |
| 4 | + Copyright (c) 2018, Adafruit Industries (adafruit.com) |
| 5 | +
|
| 6 | + This library is free software; you can redistribute it and/or |
| 7 | + modify it under the terms of the GNU Lesser General Public |
| 8 | + License as published by the Free Software Foundation; either |
| 9 | + version 2.1 of the License, or (at your option) any later version. |
| 10 | + This library is distributed in the hope that it will be useful, |
| 11 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | + See the GNU Lesser General Public License for more details. |
| 14 | + You should have received a copy of the GNU Lesser General Public |
| 15 | + License along with this library; if not, write to the Free Software |
| 16 | + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | +*/ |
| 18 | + |
| 19 | +#ifndef _VARIANT_FEATHER52840_ |
| 20 | +#define _VARIANT_FEATHER52840_ |
| 21 | + |
| 22 | +/** Master clock frequency */ |
| 23 | +#define VARIANT_MCK (64000000ul) |
| 24 | + |
| 25 | +//#define USE_LFXO // Board uses 32khz crystal for LF |
| 26 | +#define USE_LFRC // Board uses RC for LF |
| 27 | + |
| 28 | +/*---------------------------------------------------------------------------- |
| 29 | + * Headers |
| 30 | + *----------------------------------------------------------------------------*/ |
| 31 | + |
| 32 | +#include "WVariant.h" |
| 33 | + |
| 34 | +#ifdef __cplusplus |
| 35 | +extern "C" |
| 36 | +{ |
| 37 | +#endif // __cplusplus |
| 38 | + |
| 39 | +// Number of pins defined in PinDescription array |
| 40 | +#define PINS_COUNT (28) |
| 41 | +#define NUM_DIGITAL_PINS (28) |
| 42 | +#define NUM_ANALOG_INPUTS (6) // only A6 is routed and used for battery |
| 43 | +#define NUM_ANALOG_OUTPUTS (0) |
| 44 | + |
| 45 | +// LEDs |
| 46 | +#define PIN_LED1 (2) |
| 47 | +#define PIN_NEOPIXEL (3) |
| 48 | +#define NEOPIXEL_NUM 1 |
| 49 | + |
| 50 | +#define LED_BUILTIN PIN_LED1 |
| 51 | +#define LED_CONN PIN_LED1 |
| 52 | + |
| 53 | +#define LED_RED PIN_LED1 |
| 54 | +#define LED_BLUE PIN_LED1 |
| 55 | + |
| 56 | +#define LED_STATE_ON 1 // State when LED is litted |
| 57 | + |
| 58 | +/* |
| 59 | + * Buttons |
| 60 | + */ |
| 61 | +#define PIN_BUTTON1 (4) |
| 62 | + |
| 63 | +// Microphone |
| 64 | +#define PIN_PDM_DIN 5 |
| 65 | +#define PIN_PDM_CLK 6 |
| 66 | +#define PIN_PDM_PWR -1 // not used |
| 67 | + |
| 68 | +/* |
| 69 | + * Analog pins |
| 70 | + */ |
| 71 | +#define PIN_A0 (14) // not connected |
| 72 | +#define PIN_A1 (15) // not connected |
| 73 | +#define PIN_A2 (16) // not connected |
| 74 | +#define PIN_A3 (17) // not connected |
| 75 | +#define PIN_A4 (18) // not connected |
| 76 | +#define PIN_A5 (19) // not connected |
| 77 | +#define PIN_A6 (20) // VBAT |
| 78 | +#define PIN_A7 (21) // not connected |
| 79 | + |
| 80 | +static const uint8_t A0 = PIN_A0 ; |
| 81 | +static const uint8_t A1 = PIN_A1 ; |
| 82 | +static const uint8_t A2 = PIN_A2 ; |
| 83 | +static const uint8_t A3 = PIN_A3 ; |
| 84 | +static const uint8_t A4 = PIN_A4 ; |
| 85 | +static const uint8_t A5 = PIN_A5 ; |
| 86 | +static const uint8_t A6 = PIN_A6 ; |
| 87 | +static const uint8_t A7 = PIN_A7 ; |
| 88 | +#define ADC_RESOLUTION 14 |
| 89 | + |
| 90 | +// Other pins |
| 91 | +#define PIN_VBAT PIN_A6 |
| 92 | + |
| 93 | +/* |
| 94 | + * Serial interfaces |
| 95 | + */ |
| 96 | +#define PIN_SERIAL1_RX (1) // not connected |
| 97 | +#define PIN_SERIAL1_TX (0) // not connected |
| 98 | + |
| 99 | +/* |
| 100 | + * SPI Interfaces |
| 101 | + */ |
| 102 | +#define SPI_INTERFACES_COUNT 1 |
| 103 | + |
| 104 | +#define PIN_SPI_MISO (10) // not connected |
| 105 | +#define PIN_SPI_MOSI (11) // not connected |
| 106 | +#define PIN_SPI_SCK (12) // not connected |
| 107 | + |
| 108 | +static const uint8_t SS = (13); // not connected |
| 109 | +static const uint8_t MOSI = PIN_SPI_MOSI ; |
| 110 | +static const uint8_t MISO = PIN_SPI_MISO ; |
| 111 | +static const uint8_t SCK = PIN_SPI_SCK ; |
| 112 | + |
| 113 | +/* |
| 114 | + * Wire Interfaces |
| 115 | + */ |
| 116 | +#define WIRE_INTERFACES_COUNT 1 |
| 117 | + |
| 118 | +#define PIN_WIRE_SCL (8) |
| 119 | +#define PIN_WIRE_SDA (9) |
| 120 | + |
| 121 | +// QSPI Pins |
| 122 | +#define PIN_QSPI_SCK 22 |
| 123 | +#define PIN_QSPI_CS 23 |
| 124 | +#define PIN_QSPI_IO0 24 |
| 125 | +#define PIN_QSPI_IO1 25 |
| 126 | +#define PIN_QSPI_IO2 26 |
| 127 | +#define PIN_QSPI_IO3 27 |
| 128 | + |
| 129 | +// On-board QSPI Flash |
| 130 | +#define EXTERNAL_FLASH_DEVICES GD25Q16C |
| 131 | +#define EXTERNAL_FLASH_USE_QSPI |
| 132 | + |
| 133 | +#ifdef __cplusplus |
| 134 | +} |
| 135 | +#endif |
| 136 | + |
| 137 | +/*---------------------------------------------------------------------------- |
| 138 | + * Arduino objects - C++ only |
| 139 | + *----------------------------------------------------------------------------*/ |
| 140 | + |
| 141 | +#endif |
0 commit comments