未验证 提交 fab435a1 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #4739 from xfwangqiang/imxrt1064

[BSP][IMXRT]modify kconfig for i2c, uart, LCD, and fixed i2c read bug in drv_i2c.c
......@@ -32,6 +32,81 @@ menu "On-chip Peripheral Drivers"
config BSP_USING_LPUART1
bool "Enable LPUART1"
default y
config BSP_USING_LPUART2
bool "Enable LPUART2"
default n
config BSP_USING_LPUART3
bool "Enable LPUART3"
default n
config BSP_USING_LPUART4
bool "Enable LPUART4"
default n
config BSP_USING_LPUART5
bool "Enable LPUART5"
default n
config BSP_USING_LPUART6
bool "Enable LPUART6"
default n
config BSP_USING_LPUART7
bool "Enable LPUART7"
default n
config BSP_USING_LPUART8
bool "Enable LPUART8"
default n
endif
menuconfig BSP_USING_I2C
bool "Enable I2C"
select RT_USING_I2C
default n
if BSP_USING_I2C
config BSP_USING_I2C1
bool "Enable LPI2C1"
default n
config BSP_USING_I2C3
bool "Enable LPI2C3"
default n
config BSP_USING_I2C4
bool "Enable LPI2C4"
default n
endif
menuconfig BSP_USING_LCD
bool "Enable LCD"
default n
if BSP_USING_LCD
config LCD_WIDTH
int "width"
default 480
config LCD_HEIGHT
int "height"
default 272
config LCD_HFP
int "HFP"
default 4
config LCD_VFP
int "VFP"
default 4
config LCD_HBP
int "HBP"
default 8
config LCD_VBP
int "VBP"
default 2
config LCD_HSW
int "HSW"
default 40
config LCD_VSW
int "VSW"
default 10
config LCD_BL_PIN
int "Backlight ctrl pin"
default 63
config LCD_RST_PIN
int "Reset pin"
default 2
endif
endmenu
......
......@@ -221,7 +221,7 @@ static rt_size_t imxrt_i2c_mst_xfer(struct rt_i2c_bus_device *bus,
{
if (imxrt_i2c->msg[i].flags & RT_I2C_RD)
{
if (LPI2C_MasterStart(imxrt_i2c->I2C, imxrt_i2c->msg[i].addr, kLPI2C_Write) != kStatus_Success)
if (LPI2C_MasterStart(imxrt_i2c->I2C, imxrt_i2c->msg[i].addr, kLPI2C_Read) != kStatus_Success)
{
i = 0;
break;
......@@ -231,12 +231,6 @@ static rt_size_t imxrt_i2c_mst_xfer(struct rt_i2c_bus_device *bus,
{
}
if (LPI2C_MasterRepeatedStart(imxrt_i2c->I2C, imxrt_i2c->msg[i].addr, kLPI2C_Read) != kStatus_Success)
{
i = 0;
break;
}
if (LPI2C_MasterReceive(imxrt_i2c->I2C, imxrt_i2c->msg[i].buf, imxrt_i2c->msg[i].len) != kStatus_Success)
{
i = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册