添加board_config.h作为全部板上IO的宏定义位置,独立soft_i2c为单独文件

This commit is contained in:
2024-12-28 18:39:11 +08:00
parent 97587ba990
commit 7d6be9f390
7 changed files with 257 additions and 185 deletions

21
inc/board_config.h Normal file
View File

@@ -0,0 +1,21 @@
//
// Created by dell on 24-12-28.
//
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
/******************************************************************************/
#define I2C_SPEED 20000
#define RCU_GPIO_I2C RCU_GPIOF
#define RCU_I2C RCU_I2C0
#define I2C_SCL_PORT GPIOF
#define I2C_SCL_PIN GPIO_PIN_1
#define I2C_SDA_PORT GPIOF
#define I2C_SDA_PIN GPIO_PIN_0
#define I2C_GPIO_AF GPIO_AF_1
/******************************************************************************/
#endif //BOARD_CONFIG_H