mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-08 01:44:32 +08:00
[RTduino]stm32f103-blue-pill更新对接文件
This commit is contained in:
parent
655beb3bda
commit
4e9786cdab
@ -5,8 +5,9 @@
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-08-05 liYony first version
|
||||
* 2022-09-20 liYony first version
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <board.h>
|
||||
#include "pins_arduino.h"
|
||||
@ -27,15 +28,15 @@ const pin_map_t pin_map_table[]=
|
||||
{D4, GET_PIN(B,3), "pwm2", 2}, /* PWM */
|
||||
{D5, GET_PIN(A,15), "pwm2", 1}, /* PWM */
|
||||
{D6, GET_PIN(A,8)},
|
||||
{D7, GET_PIN(B,12)},
|
||||
{D7, GET_PIN(B,12)}, /* SPI-SS */
|
||||
{D8, GET_PIN(C,13)}, /* LED_BUILTIN */
|
||||
{D9, GET_PIN(C,14)},
|
||||
{D10, GET_PIN(C,15)},
|
||||
{D11, GET_PIN(A,0)},
|
||||
{D12, GET_PIN(B,0), "pwm3", 3}, /* PWM */
|
||||
{D13, GET_PIN(B,1), "pwm3", 4}, /* PWM */
|
||||
{D14, GET_PIN(B,9), "i2c1"}, /* I2C (Wire) */
|
||||
{D15, GET_PIN(B,8), "i2c1"}, /* I2C (Wire) */
|
||||
{D14, GET_PIN(B,9), "i2c1"}, /* I2C-SDA (Wire) */
|
||||
{D15, GET_PIN(B,8), "i2c1"}, /* I2C-SCL (Wire) */
|
||||
{D16, GET_PIN(A,12), "usb"}, /* SerialUSB */
|
||||
{D17, GET_PIN(A,11), "usb"}, /* SerialUSB */
|
||||
{D18, GET_PIN(A,10), "uart1"}, /* Serial-Rx */
|
||||
@ -44,14 +45,14 @@ const pin_map_t pin_map_table[]=
|
||||
{D21, GET_PIN(A,3), "uart2"}, /* Serial2-Rx */
|
||||
{D22, GET_PIN(B,10), "uart3"}, /* Serial3-Tx */
|
||||
{D23, GET_PIN(B,11), "uart3"}, /* Serial3-Rx */
|
||||
{D24, GET_PIN(B,15), "spi2"}, /* SPI */
|
||||
{D25, GET_PIN(B,14), "spi2"}, /* SPI */
|
||||
{D26, GET_PIN(B,13), "spi2"}, /* SPI */
|
||||
{D24, GET_PIN(B,15), "spi2"}, /* SPI-MOSI */
|
||||
{D25, GET_PIN(B,14), "spi2"}, /* SPI-MISO */
|
||||
{D26, GET_PIN(B,13), "spi2"}, /* SPI-SCK */
|
||||
{A0, GET_PIN(A,1), "adc1", 1}, /* ADC */
|
||||
{A1, GET_PIN(A,4), "adc1", 4}, /* ADC */
|
||||
{A2, GET_PIN(A,5), "adc1", 5}, /* ADC */
|
||||
{A3, GET_PIN(A,6), "adc1", 6}, /* ADC */
|
||||
{A4, GET_PIN(A,7), "adc1", 7}, /* ADC */
|
||||
{A5, RT_NULL, "adc1", 17}, /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
|
||||
{A6, RT_NULL, "adc1", 16} /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
|
||||
{A6, RT_NULL, "adc1", 16}, /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-08-05 liYony first version
|
||||
* 2022-09-20 liYony first version
|
||||
*/
|
||||
|
||||
#ifndef Pins_Arduino_h
|
||||
@ -47,20 +47,21 @@
|
||||
#define A5 (32)
|
||||
#define A6 (33)
|
||||
|
||||
#define F_CPU 72000000L /* CPU: 72MHz */
|
||||
#define F_CPU 72000000L /* CPU:72MHz */
|
||||
|
||||
#define LED_BUILTIN D8 /* Default Built-in LED */
|
||||
|
||||
/* i2c1 - PB9-SDA PB8-SCL */
|
||||
/* i2c1 : PB9-SDA PB8-SCL */
|
||||
#define RTDUINO_DEFAULT_IIC_BUS_NAME "i2c1"
|
||||
|
||||
/* Serial2 - PA2-TX PA3-RX */
|
||||
#define RTDUINO_SERIAL2_DEVICE_NAME "uart2"
|
||||
|
||||
/* Serial3 - PB10-TX PB11-RX */
|
||||
#define RTDUINO_SERIAL3_DEVICE_NAME "uart3"
|
||||
|
||||
/* spi2 - PB13-SCK PB14-MISO PB15-MOSI */
|
||||
/* spi2 : PB13-SCK PB14-MISO PB15-MOSI */
|
||||
#define SS D7 /* Chip select pin of default spi */
|
||||
#define RTDUINO_DEFAULT_SPI_BUS_NAME "spi2"
|
||||
|
||||
/* Serial2 : PA2-TX PA3-RX */
|
||||
#define RTDUINO_SERIAL2_DEVICE_NAME "uart2"
|
||||
|
||||
/* Serial3 : PB10-TX PB11-RX */
|
||||
#define RTDUINO_SERIAL3_DEVICE_NAME "uart3"
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
|
Loading…
x
Reference in New Issue
Block a user