|
| 1 | +/* |
| 2 | +Copyright (c) 2019 SparkFun Electronics |
| 3 | +
|
| 4 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | +of this software and associated documentation files (the "Software"), to deal |
| 6 | +in the Software without restriction, including without limitation the rights |
| 7 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 8 | +copies of the Software, and to permit persons to whom the Software is |
| 9 | +furnished to do so, subject to the following conditions: |
| 10 | +
|
| 11 | +The above copyright notice and this permission notice shall be included in all |
| 12 | +copies or substantial portions of the Software. |
| 13 | +
|
| 14 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 17 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 20 | +SOFTWARE. |
| 21 | +*/ |
| 22 | + |
| 23 | +#include "variant.h" |
| 24 | + |
| 25 | +const ap3_gpio_pad_t ap3_variant_pinmap[AP3_VARIANT_NUM_PINS] = { |
| 26 | + //~ = PWM, A = ADC |
| 27 | + //Apollo Pad, //Silkscreen indicator - Pin functions |
| 28 | + 25, //0 - ~RX1/SDA2/MISO2 |
| 29 | + 24, //1 - ~TX1/32kHz/SWO |
| 30 | + 44, //2 - ~MOSI4 |
| 31 | + 35, //3/A6 - ~A/TX1/I2SDAT/PDMCLK |
| 32 | + 4, //4 - ~RX1/SLINT |
| 33 | + 22, //5 - ~PDMCLK/SWO |
| 34 | + 23, //6 - ~I2SWCLK/CMPOUT |
| 35 | + 27, //7 - ~SCL2/SCK2 |
| 36 | + 28, //8 - ~MOSI2/I2SWCLK |
| 37 | + 32, //9/A7 - ~A/SCCIO |
| 38 | + 14, //10 - SWCH/ADCD1N/TX1/PDMCLK |
| 39 | + 7, //11 - ~MOSI0/CLKOUT |
| 40 | + 6, //12 - ~MISO0/SDA0/I2SDAT |
| 41 | + 5, //13 - ~SCK0/SCL0 |
| 42 | + 40, //14 - SDA4/MISO4/RX1 |
| 43 | + 39, //15 - ~SCL4/SCK4/TX1 |
| 44 | + 43, //16 - ~SDA3/MISO3/RX1 |
| 45 | + 42, //17 - ~SCL3/SCK3/TX1 |
| 46 | + 26, //18 - ~LED/SCCRST |
| 47 | + 33, //19/A0 - ~A/SWO/32KHZ |
| 48 | + 13, //20/A1 - ~A/I2SBCLK/RX1 |
| 49 | + 11, //21/A2 - ~A/PDMDATA |
| 50 | + 29, //22/A3 - ~A/PDMDATA |
| 51 | + 12, //23/A4 - ~A/PDMCLK/TX1 |
| 52 | + 31, //24/A5 - ~A/SCCCLK |
| 53 | + 48, //25 - Not exposed, TX0 |
| 54 | + 49, //26 - Not exposed, RX0 |
| 55 | + 36, //27 - Not exposed, PDMDATA of Mic |
| 56 | + 37, //28 - Not exposed, PDMCLK of Mic |
| 57 | +}; |
| 58 | + |
| 59 | +// Uart Definitions |
| 60 | +//Serial(instance, RX, TX) |
| 61 | +Uart Serial(0, 26, 25); // Declares a Uart object called Serial using instance 0 of Apollo3 UART peripherals with RX on variant pin 26 and TX on pin 25 (note, you specify *pins* not Apollo3 pads. This uses the variant's pin map to determine the Apollo3 pad) |
| 62 | +Uart Serial1(1, 0, 1); // Declares a Uart object called Serial1 using instance 1 of Apollo3 UART peripherals with RX on pin 0 and TX on pin 1 (note, you specify *pins* not Apollo3 pads. This uses the variant's pin map to determine the Apollo3 pad) |
0 commit comments