mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-31 15:50:26 +08:00
将驱动文件中判断RT_USING_XXX改为BSP_USING_XXX,解决了部分框架层与驱动层的混用
This commit is contained in:
parent
4c92886ee5
commit
e01776ea76
@ -15,7 +15,7 @@
|
||||
#include <board.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_PORT(pin) ((uint8_t)(((pin) >> 4) & 0xFu))
|
||||
@ -794,4 +794,4 @@ int rt_hw_pin_init(void)
|
||||
return rt_device_pin_register("pin", &_stm32_pin_ops, RT_NULL);
|
||||
}
|
||||
|
||||
#endif /* RT_USING_PIN */
|
||||
#endif /* BSP_USING_GPIO */
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <board.h>
|
||||
|
||||
#ifdef RT_USING_PWM
|
||||
#ifdef BSP_USING_PWM
|
||||
#include "drv_config.h"
|
||||
#include <drivers/rt_drv_pwm.h>
|
||||
|
||||
@ -685,4 +685,4 @@ __exit:
|
||||
return result;
|
||||
}
|
||||
INIT_DEVICE_EXPORT(stm32_pwm_init);
|
||||
#endif /* RT_USING_PWM */
|
||||
#endif /* BSP_USING_PWM */
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <rtdevice.h>
|
||||
#include "board.h"
|
||||
|
||||
#ifdef RT_USING_SPI
|
||||
#ifdef BSP_USING_SPI
|
||||
|
||||
#if defined(BSP_USING_SPI1) || defined(BSP_USING_SPI2) || defined(BSP_USING_SPI3) || defined(BSP_USING_SPI4) || defined(BSP_USING_SPI5) || defined(BSP_USING_SPI6)
|
||||
|
||||
@ -999,4 +999,4 @@ int rt_hw_spi_init(void)
|
||||
INIT_BOARD_EXPORT(rt_hw_spi_init);
|
||||
|
||||
#endif /* BSP_USING_SPI1 || BSP_USING_SPI2 || BSP_USING_SPI3 || BSP_USING_SPI4 || BSP_USING_SPI5 */
|
||||
#endif /* RT_USING_SPI */
|
||||
#endif /* BSP_USING_SPI */
|
||||
|
Loading…
x
Reference in New Issue
Block a user