From 21daf7359a07ee99a575c6536f42196101526bca Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Fri, 10 Nov 2017 19:47:53 +0800 Subject: [PATCH] Update drv_i2c.c --- bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c b/bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c index 7a30313ce..27013feaf 100644 --- a/bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c +++ b/bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c @@ -32,7 +32,7 @@ #ifdef RT_USING_I2C_BITOPS -struct stm32_i2c_bit_data +struct lpc_i2c_bit_data { struct { @@ -44,7 +44,7 @@ struct stm32_i2c_bit_data static void gpio_set_sda(void *data, rt_int32_t state) { - struct stm32_i2c_bit_data *bd = data; + struct lpc_i2c_bit_data *bd = data; if (state) { @@ -59,7 +59,7 @@ static void gpio_set_sda(void *data, rt_int32_t state) static void gpio_set_scl(void *data, rt_int32_t state) { - struct stm32_i2c_bit_data *bd = data; + struct lpc_i2c_bit_data *bd = data; if (state) { @@ -75,14 +75,14 @@ static void gpio_set_scl(void *data, rt_int32_t state) static rt_int32_t gpio_get_sda(void *data) { - struct stm32_i2c_bit_data *bd = data; + struct lpc_i2c_bit_data *bd = data; return GPIO_ReadPinInput(bd->sda.base, bd->sda.port, bd->sda.pin) & 0x01; } static rt_int32_t gpio_get_scl(void *data) { - struct stm32_i2c_bit_data *bd = data; + struct lpc_i2c_bit_data *bd = data; return GPIO_ReadPinInput(bd->scl.base, bd->scl.port, bd->scl.pin) & 0x01; } @@ -227,7 +227,7 @@ int rt_hw_i2c_init(void) { static struct rt_i2c_bus_device i2c_device; - static const struct stm32_i2c_bit_data _i2c_bdata = + static const struct lpc_i2c_bit_data _i2c_bdata = { /* SCL */ {GPIO, 3, 24}, /* SDA */ {GPIO, 3, 23},