replaced the judgement of RT_USING_XXX with BSP_USING, and add some… (#6554)

* replaced the judgement of RT_USING_XXX  with  BSP_USING, and add some tips in Konfig about soft_i2c
This commit is contained in:
linshire 2022-10-24 11:08:20 +08:00 committed by GitHub
parent e59b6c7ab4
commit fd6cfa3bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@
#include <board.h> #include <board.h>
#include "drv_gpio.h" #include "drv_gpio.h"
#ifdef RT_USING_PIN #ifdef BSP_USING_GPIO
#define PIN_NUM(port, no) (((((port) & 0xFu) << 4) | ((no) & 0xFu))) #define PIN_NUM(port, no) (((((port) & 0xFu) << 4) | ((no) & 0xFu)))
#define PIN_PORT(pin) ((uint8_t)(((pin) >> 4) & 0xFu)) #define PIN_PORT(pin) ((uint8_t)(((pin) >> 4) & 0xFu))
#define PIN_NO(pin) ((uint8_t)((pin) & 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); INIT_BOARD_EXPORT(rt_hw_pin_init);
#endif /* RT_USING_PIN */ #endif /* BSP_USING_GPIO */

View File

@ -11,7 +11,7 @@
#include <board.h> #include <board.h>
#include "drv_soft_spi.h" #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" #define LOG_TAG "drv.soft_spi"
#include <drv_log.h> #include <drv_log.h>
@ -225,4 +225,4 @@ int rt_soft_spi_init(void)
} }
INIT_BOARD_EXPORT(rt_soft_spi_init); 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 */

View File

@ -98,7 +98,7 @@ menu "On-chip Peripheral Drivers"
if BSP_USING_SOFT_I2C if BSP_USING_SOFT_I2C
config BSP_USING_I2C1 config BSP_USING_I2C1
bool "Enable I2C1 Bus" bool "Enable I2C1 Bus (software simulation)"
default n default n
if BSP_USING_I2C1 if BSP_USING_I2C1
@ -115,7 +115,7 @@ menu "On-chip Peripheral Drivers"
endif endif
config BSP_USING_I2C2 config BSP_USING_I2C2
bool "Enable I2C2 Bus" bool "Enable I2C2 Bus (software simulation)"
default n default n
if BSP_USING_I2C2 if BSP_USING_I2C2