|
| 1 | +/** |
| 2 | + ******************************************************************************* |
| 3 | + * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. |
| 4 | + * All rights reserved. |
| 5 | + * |
| 6 | + * This software component is licensed by WCH under BSD 3-Clause license, |
| 7 | + * the "License"; You may not use this file except in compliance with the |
| 8 | + * License. You may obtain a copy of the License at: |
| 9 | + * opensource.org/licenses/BSD-3-Clause |
| 10 | + * |
| 11 | + ******************************************************************************* |
| 12 | + */ |
| 13 | + |
| 14 | +#include "pins_arduino.h" |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +// Digital PinName array |
| 20 | +const PinName digitalPin[] = { |
| 21 | + PA_0, // D0 A0 |
| 22 | + PA_1, // D1 A1 |
| 23 | + PA_2, // D2 TX2/A2 |
| 24 | + PA_3, // D3 RX2/A3 |
| 25 | + PA_4, // D4 CS/A4 |
| 26 | + PA_5, // D5 SCK/A5 |
| 27 | + PA_6, // D6 MISO/A6 |
| 28 | + PB_0, // D7 MOSI/A8 PA7 is tied to PB0 => input only |
| 29 | + PB_1, // D8 A9 |
| 30 | + PB_7, // D9 RST |
| 31 | + PC_16, // D10 USBDM tied to PC11=input only |
| 32 | + PC_17, // D11 USBPD tied to PC10=input only |
| 33 | + PA_9, // D12 |
| 34 | + PA_11, // D13 SDA (not in 0-series) |
| 35 | + PA_10, // D14 SCL (not in 0-series) |
| 36 | + PC_3, // D15 A13 |
| 37 | + PC_18, // D16 SWDIO |
| 38 | + PC_19, // D17 SWCLK |
| 39 | +}; |
| 40 | + |
| 41 | +// Analog (Ax) pin number array, refers to PinName in digitalPin[]? |
| 42 | +const uint32_t analogInputPin[] = { |
| 43 | + 0, // A0, PA0 |
| 44 | + 1, // A1, PA1 |
| 45 | + 2, // A2, PA2 |
| 46 | + 3, // A3, PA3 (no ADC Ch3 in 0-series!) |
| 47 | + 4, // A4, PA4 |
| 48 | + 5, // A5, PA5 |
| 49 | + 6, // A6, PA6 |
| 50 | + 7, // A7, PA7=PB0, input only |
| 51 | + 7, // A8, PB0=PA7, input only |
| 52 | + 8, // A9, PB1 |
| 53 | + 10, // A10, none |
| 54 | + 11, // A11, none |
| 55 | + 12, // A12, none |
| 56 | + 15, // A13, PC3 |
| 57 | +}; |
| 58 | + |
0 commit comments