2021-12-13 11:36:51 +08:00
|
|
|
/*
|
2022-03-20 15:46:33 +08:00
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
2021-12-13 11:36:51 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2021-12-10 Meco Man first version
|
2022-09-19 10:14:35 +08:00
|
|
|
* 2022-09-18 Meco Man sort pinout out
|
2021-12-13 11:36:51 +08:00
|
|
|
*/
|
2022-09-19 10:14:35 +08:00
|
|
|
|
2021-12-13 11:36:51 +08:00
|
|
|
#include <Arduino.h>
|
2022-02-17 13:36:15 +08:00
|
|
|
#include "pins_arduino.h"
|
2021-12-13 11:36:51 +08:00
|
|
|
|
2022-03-20 15:46:33 +08:00
|
|
|
/*
|
2022-09-19 10:14:35 +08:00
|
|
|
* {Arduino Pin, RT-Thread Pin [, Device Name, Channel]}
|
|
|
|
* [] means optional
|
|
|
|
* Digital pins must NOT give the device name and channel.
|
|
|
|
* Analog pins MUST give the device name and channel(ADC, PWM or DAC).
|
|
|
|
* Arduino Pin must keep in sequence.
|
|
|
|
*/
|
2022-03-10 13:44:39 +08:00
|
|
|
const pin_map_t pin_map_table[]=
|
2021-12-13 11:36:51 +08:00
|
|
|
{
|
2022-09-19 10:14:35 +08:00
|
|
|
{D0, GET_PIN(A,10), "uart1"}, /* Serial-Rx */
|
|
|
|
{D1, GET_PIN(A,9), "uart1"}, /* Serial-Tx */
|
2022-03-20 15:46:33 +08:00
|
|
|
{D2, GET_PIN(B,9)},
|
2022-09-19 10:14:35 +08:00
|
|
|
{D3, GET_PIN(D,15), "pwm4", 4}, /* PWM */
|
2022-03-20 15:46:33 +08:00
|
|
|
{D4, GET_PIN(A,8)},
|
|
|
|
{D5, GET_PIN(D,14)},
|
2022-09-19 10:14:35 +08:00
|
|
|
{D6, GET_PIN(B,11), "pwm2", 4}, /* PWM */
|
2022-03-20 15:46:33 +08:00
|
|
|
{D7, GET_PIN(B,14)},
|
|
|
|
{D8, GET_PIN(B,12)},
|
2022-09-19 10:14:35 +08:00
|
|
|
{D9, GET_PIN(D,12), "pwm4", 1}, /* PWM */
|
|
|
|
{D10, GET_PIN(B,10), "pwm2", 3}, /* PWM */
|
|
|
|
{D11, GET_PIN(B,8), "pwm4", 3}, /* PWM */
|
2022-03-20 15:46:33 +08:00
|
|
|
{D12, GET_PIN(B,15)},
|
|
|
|
{D13, GET_PIN(B,13)},
|
2022-09-19 10:14:35 +08:00
|
|
|
{D14, GET_PIN(A,1)}, /* BSP: MOTOR-A */
|
|
|
|
{D15, GET_PIN(A,0)}, /* BSP: MOTOR-B */
|
|
|
|
{D16, GET_PIN(B,2)}, /* BSP: BEEP */
|
|
|
|
{D17, GET_PIN(D,10)}, /* BSP: KEY0 */
|
|
|
|
{D18, GET_PIN(D,9)}, /* BSP: KEY1 */
|
|
|
|
{D19, GET_PIN(D,8)}, /* BSP: KEY2 */
|
|
|
|
{D20, GET_PIN(C,13)}, /* BSP: KEY-WKUP */
|
|
|
|
{D21, GET_PIN(E,7)}, /* BSP: RED-LED */
|
|
|
|
{D22, GET_PIN(E,8)}, /* LED_BUILTIN, BSP: GREEN-LED */
|
|
|
|
{D23, GET_PIN(E,9), "pwm1", 1}, /* PWM, BSP: BLUE-LED */
|
|
|
|
{D24, GET_PIN(B,0)}, /* BSP: INFRARED EMISSION */
|
|
|
|
{D25, GET_PIN(B,1)}, /* BSP: INFRARED RECEPTION */
|
|
|
|
{D26, GET_PIN(D,4)}, /* BSP: WIRELESS CE */
|
|
|
|
{D27, GET_PIN(D,3)}, /* BSP: WIRELESS IRQ */
|
|
|
|
{D28, GET_PIN(D,5)}, /* SPI-SS, BSP: WIRELESS CS */
|
|
|
|
{D29, GET_PIN(B,13), "spi2"}, /* SPI-SCK */
|
|
|
|
{D30, GET_PIN(B,14), "spi2"}, /* SPI-MISO */
|
|
|
|
{D31, GET_PIN(B,15), "spi2"}, /* SPI-MOSI */
|
|
|
|
{D32, GET_PIN(C,7), "i2c1"}, /* I2C-SDA (Wire) */
|
|
|
|
{D33, GET_PIN(C,6), "i2c1"}, /* I2C-SCL (Wire) */
|
|
|
|
{D34, GET_PIN(A,2), "uart2"}, /* Serial2-Tx */
|
|
|
|
{D35, GET_PIN(A,3), "uart2"}, /* Serial2-Rx */
|
|
|
|
{A0, GET_PIN(C,2), "adc1", 3}, /* ADC */
|
|
|
|
{A1, GET_PIN(C,4), "adc1", 13}, /* ADC */
|
2023-04-08 16:08:50 +08:00
|
|
|
{A2, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF}, /* ADC, On-Chip: internal reference voltage */
|
|
|
|
{A3, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
|
2022-09-19 10:14:35 +08:00
|
|
|
{DAC0, GET_PIN(A,4), "dac1", 1}, /* DAC */
|
2021-12-13 11:36:51 +08:00
|
|
|
};
|