Просмотр исходного кода

fix: lcd库在air302上编译失败

Wendal Chen 4 лет назад
Родитель
Сommit
29f5270abe

+ 1 - 1
components/lcd/luat_lcd_custom.c

@@ -58,7 +58,7 @@ static int custom_draw(luat_lcd_conf_t* conf, uint16_t x_start, uint16_t y_start
     uint32_t size = size = (x_end - x_start+1) * (y_end - y_start+1) * 2;
     luat_lcd_set_address(conf,x_start, y_start, x_end, y_end);
     luat_gpio_set(conf->pin_dc, Luat_GPIO_HIGH);
-    luat_spi_send(conf->port, color, size);
+    luat_spi_send(conf->port, (const char*)color, size);
     return 0;
 }
 

+ 1 - 1
components/lcd/luat_lcd_gc9106l.c

@@ -122,7 +122,7 @@ static int gc9106l_draw(luat_lcd_conf_t* conf, uint16_t x_start, uint16_t y_star
     uint32_t size = size = (x_end - x_start+1) * (y_end - y_start+1) * 2;
     luat_lcd_set_address(conf,x_start, y_start, x_end, y_end);
     luat_gpio_set(conf->pin_dc, Luat_GPIO_HIGH);
-    luat_spi_send(conf->port, color, size);
+    luat_spi_send(conf->port, (const char*)color, size);
     return 0;
 }
 

+ 1 - 1
components/lcd/luat_lcd_gc9306.c

@@ -190,7 +190,7 @@ static int gc9306_draw(luat_lcd_conf_t* conf, uint16_t x_start, uint16_t y_start
     uint32_t size = size = (x_end - x_start+1) * (y_end - y_start+1) * 2;
     luat_lcd_set_address(conf,x_start, y_start, x_end, y_end);
     luat_gpio_set(conf->pin_dc, Luat_GPIO_HIGH);
-    luat_spi_send(conf->port, color, size);
+    luat_spi_send(conf->port, (const char*)color, size);
     return 0;
 }
 

+ 1 - 1
components/lcd/luat_lcd_gc9a01.c

@@ -289,7 +289,7 @@ static int gc9a01_draw(luat_lcd_conf_t* conf, uint16_t x_start, uint16_t y_start
     uint32_t size = size = (x_end - x_start+1) * (y_end - y_start+1) * 2;
     luat_lcd_set_address(conf,x_start, y_start, x_end, y_end);
     luat_gpio_set(conf->pin_dc, Luat_GPIO_HIGH);
-    luat_spi_send(conf->port, color, size);
+    luat_spi_send(conf->port, (const char*)color, size);
     return 0;
 }
 

+ 1 - 1
components/lcd/luat_lcd_ili9341.c

@@ -166,7 +166,7 @@ static int ili9341_draw(luat_lcd_conf_t* conf, uint16_t x_start, uint16_t y_star
     uint32_t size = size = (x_end - x_start+1) * (y_end - y_start+1) * 2;
     luat_lcd_set_address(conf,x_start, y_start, x_end, y_end);
     luat_gpio_set(conf->pin_dc, Luat_GPIO_HIGH);
-    luat_spi_send(conf->port, color, size);
+    luat_spi_send(conf->port, (const char*)color, size);
     return 0;
 }
 

+ 1 - 1
components/lcd/luat_lcd_st7735.c

@@ -152,7 +152,7 @@ static int st7735_draw(luat_lcd_conf_t* conf, uint16_t x_start, uint16_t y_start
     uint32_t size = size = (x_end - x_start+1) * (y_end - y_start+1) * 2;
     luat_lcd_set_address(conf,x_start, y_start, x_end, y_end);
     luat_gpio_set(conf->pin_dc, Luat_GPIO_HIGH);
-    luat_spi_send(conf->port, color, size);
+    luat_spi_send(conf->port, (const char*)color, size);
     return 0;
 }
 

+ 1 - 1
components/lcd/luat_lcd_st7789.c

@@ -140,7 +140,7 @@ static int st7789_draw(luat_lcd_conf_t* conf, uint16_t x_start, uint16_t y_start
     uint32_t size = size = (x_end - x_start+1) * (y_end - y_start+1) * 2;
     luat_lcd_set_address(conf,x_start, y_start, x_end, y_end);
     luat_gpio_set(conf->pin_dc, Luat_GPIO_HIGH);
-    luat_spi_send(conf->port, color, size);
+    luat_spi_send(conf->port, (const char*)color, size);
     return 0;
 }