|
| 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 | +
|
| 11 | + This library is distributed in the hope that it will be useful, |
| 12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | + See the GNU Lesser General Public License for more details. |
| 15 | +
|
| 16 | + You should have received a copy of the GNU Lesser General Public |
| 17 | + License along with this library; if not, write to the Free Software |
| 18 | + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | +*/ |
| 20 | + |
| 21 | +#include "variant.h" |
| 22 | + |
| 23 | +#include "nrf.h" |
| 24 | +#include "wiring_constants.h" |
| 25 | +#include "wiring_digital.h" |
| 26 | + |
| 27 | +const uint32_t g_ADigitalPinMap[] = { |
| 28 | + // P0 |
| 29 | + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, |
| 30 | + 29, 30, 31, |
| 31 | + |
| 32 | + // P1 |
| 33 | + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 |
| 34 | +}; |
| 35 | + |
| 36 | +void initVariant() { |
| 37 | + // LED1 & LED2 |
| 38 | +#ifdef PIN_LED1 |
| 39 | + pinMode(PIN_LED1, OUTPUT); |
| 40 | + ledOff(PIN_LED1); |
| 41 | +#endif |
| 42 | + |
| 43 | +#ifdef PIN_LED2 |
| 44 | + pinMode(PIN_LED2, OUTPUT); |
| 45 | + ledOff(PIN_LED2); |
| 46 | +#endif |
| 47 | + |
| 48 | + // 3V3 Power Rail - nothing connected on meshtiny |
| 49 | + pinMode(PIN_3V3_EN, OUTPUT); |
| 50 | + digitalWrite(PIN_3V3_EN, LOW); |
| 51 | +} |
0 commit comments