4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 12:53:31 +08:00

[bsp][stm32] restore soft iic driver

This commit is contained in:
SummerGift 2018-12-26 10:18:42 +08:00
parent 7279078005
commit 8963bb6966
2 changed files with 1 additions and 13 deletions

View File

@ -18,7 +18,7 @@
#define LOG_TAG "drv.i2c"
#include <drv_log.h>
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3)
#error "Please define at least one BSP_USING_I2Cx"
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
#endif
@ -34,9 +34,6 @@ static const struct stm32_soft_i2c_config soft_i2c_config[] =
#ifdef BSP_USING_I2C3
I2C3_BUS_CONFIG,
#endif
#ifdef BSP_USING_I2C4
I2C4_BUS_CONFIG,
#endif
};
static struct stm32_i2c i2c_obj[sizeof(soft_i2c_config) / sizeof(soft_i2c_config[0])];

View File

@ -56,15 +56,6 @@ struct stm32_i2c
}
#endif
#ifdef BSP_USING_I2C4
#define I2C4_BUS_CONFIG \
{ \
.scl = BSP_I2C4_SCL_PIN, \
.sda = BSP_I2C4_SDA_PIN, \
.bus_name = "i2c4", \
}
#endif
int rt_hw_i2c_init(void);
#endif