diff --git a/bsp/stm32f429-disco/drivers/drv_lcd.c b/bsp/stm32f429-disco/drivers/drv_lcd.c index 6612f60928..0b14234f8a 100644 --- a/bsp/stm32f429-disco/drivers/drv_lcd.c +++ b/bsp/stm32f429-disco/drivers/drv_lcd.c @@ -919,8 +919,6 @@ FINSH_FUNCTION_EXPORT(lcd_blit_line, draw blit line in lcd display); static int rt_hw_lcd_init(void) { - _lcd_low_level_init(); - static struct rt_device lcd_device; static struct rt_device_graphic_ops ili9341_ops = @@ -932,6 +930,8 @@ static int rt_hw_lcd_init(void) ili9341_lcd_blit_line }; + _lcd_low_level_init(); + /* register lcd device */ lcd_device.type = RT_Device_Class_Graphic; lcd_device.init = lcd_init; diff --git a/bsp/stm32f429-disco/drivers/drv_touch.c b/bsp/stm32f429-disco/drivers/drv_touch.c index ea60c858c5..8559b69f98 100644 --- a/bsp/stm32f429-disco/drivers/drv_touch.c +++ b/bsp/stm32f429-disco/drivers/drv_touch.c @@ -67,7 +67,10 @@ static int32_t touch_read (uint8_t reg, uint8_t *val) static int32_t touch_write(uint8_t reg, uint8_t val) { struct rt_i2c_msg msgs; - rt_uint8_t buf[2] = {reg, val}; + rt_uint8_t buf[2]; + + buf[0] = reg; + buf[1] = val; msgs.addr = TSC_I2C_ADDR; msgs.flags = RT_I2C_WR;