From fd6cfa3bbd57ce645eadd58dd1aad7f2b07e59ee Mon Sep 17 00:00:00 2001 From: linshire <89723088+linshire@users.noreply.github.com> Date: Mon, 24 Oct 2022 11:08:20 +0800 Subject: [PATCH] =?UTF-8?q?replaced=20the=20judgement=20of=20RT=5FUSING=5F?= =?UTF-8?q?XXX=20=20with=20=20BSP=5FUSING,=20and=20add=20some=E2=80=A6=20(?= =?UTF-8?q?#6554)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * replaced the judgement of RT_USING_XXX with BSP_USING, and add some tips in Konfig about soft_i2c --- bsp/wch/risc-v/Libraries/ch32_drivers/drv_gpio.c | 4 ++-- bsp/wch/risc-v/Libraries/ch32_drivers/drv_soft_spi.c | 4 ++-- bsp/wch/risc-v/ch32v307v-r1/board/Kconfig | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_gpio.c b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_gpio.c index 1203303bde..d4a925c6ae 100644 --- a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_gpio.c +++ b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_gpio.c @@ -11,7 +11,7 @@ #include #include "drv_gpio.h" -#ifdef RT_USING_PIN +#ifdef BSP_USING_GPIO #define PIN_NUM(port, no) (((((port) & 0xFu) << 4) | ((no) & 0xFu))) #define PIN_PORT(pin) ((uint8_t)(((pin) >> 4) & 0xFu)) #define PIN_NO(pin) ((uint8_t)((pin) & 0xFu)) @@ -569,4 +569,4 @@ int rt_hw_pin_init(void) } INIT_BOARD_EXPORT(rt_hw_pin_init); -#endif /* RT_USING_PIN */ +#endif /* BSP_USING_GPIO */ diff --git a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_soft_spi.c b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_soft_spi.c index ebe66a51f9..1795343ac3 100644 --- a/bsp/wch/risc-v/Libraries/ch32_drivers/drv_soft_spi.c +++ b/bsp/wch/risc-v/Libraries/ch32_drivers/drv_soft_spi.c @@ -11,7 +11,7 @@ #include #include "drv_soft_spi.h" -#if defined(RT_USING_SPI) && defined(RT_USING_SPI_BITOPS) && defined(RT_USING_PIN) +#ifdef BSP_USING_SOFT_I2C #define LOG_TAG "drv.soft_spi" #include @@ -225,4 +225,4 @@ int rt_soft_spi_init(void) } INIT_BOARD_EXPORT(rt_soft_spi_init); -#endif /* defined(RT_USING_SPI) && defined(RT_USING_SPI_BITOPS) && defined(RT_USING_PIN) */ +#endif /* BSP_USING_SOFT_I2C */ diff --git a/bsp/wch/risc-v/ch32v307v-r1/board/Kconfig b/bsp/wch/risc-v/ch32v307v-r1/board/Kconfig index 182bdacab0..2a13b88126 100644 --- a/bsp/wch/risc-v/ch32v307v-r1/board/Kconfig +++ b/bsp/wch/risc-v/ch32v307v-r1/board/Kconfig @@ -98,7 +98,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_SOFT_I2C config BSP_USING_I2C1 - bool "Enable I2C1 Bus" + bool "Enable I2C1 Bus (software simulation)" default n if BSP_USING_I2C1 @@ -115,7 +115,7 @@ menu "On-chip Peripheral Drivers" endif config BSP_USING_I2C2 - bool "Enable I2C2 Bus" + bool "Enable I2C2 Bus (software simulation)" default n if BSP_USING_I2C2