[bsp][stm32f429-disco] support ANSI C.

This commit is contained in:
aozima 2018-12-02 18:24:16 +08:00
parent b15aa8a1ed
commit a3b4e78527
2 changed files with 6 additions and 3 deletions

View File

@ -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;

View File

@ -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;