Added demo image.
This commit is contained in:
parent
e680528d73
commit
d0e41353b2
|
@ -2,6 +2,7 @@ idf_component_register(
|
|||
SRCS
|
||||
"app_main.c"
|
||||
"app_lcd_impl.c"
|
||||
"app_demo_image_1.c"
|
||||
"lib/st7789_lcd.c"
|
||||
|
||||
INCLUDE_DIRS
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,6 +34,8 @@ st7789_lcd_ret_t lcd_impl_delay(void *pdev, uint32_t msec);
|
|||
st7789_lcd_ret_t lcd_impl_write_command(void *pdev, uint8_t *command, uint32_t len);
|
||||
st7789_lcd_ret_t lcd_impl_write_data(void *pdev, uint8_t *data, uint32_t len);
|
||||
|
||||
extern const uint8_t app_demo_image_1_rgb565[115200];
|
||||
|
||||
void app_main(void) {
|
||||
ESP_LOGI(APP_LOG_TAG, "MAIN");
|
||||
|
||||
|
@ -49,7 +51,7 @@ void app_main(void) {
|
|||
{
|
||||
.dir = ST7789_LCD_DIR_0,
|
||||
.inverted = false,
|
||||
.bgr_mode = false,
|
||||
.bgr_mode = true,
|
||||
.pix_fmt = ST7789_LCD_PIXFMT_RGB565,
|
||||
},
|
||||
.user_data = lcd_impl_init(),
|
||||
|
@ -64,6 +66,17 @@ void app_main(void) {
|
|||
ESP_LOGE(APP_LOG_TAG, "LCD init failed");
|
||||
}
|
||||
|
||||
st7789_lcd_coord_t coord = {
|
||||
.x_start = 0,
|
||||
.x_end = 239,
|
||||
.y_start = 0,
|
||||
.y_end = 239,
|
||||
};
|
||||
|
||||
if(st7789_lcd_upload(&lcd, &coord, (uint8_t *)app_demo_image_1_rgb565) != ST7789_SUCCESS) {
|
||||
ESP_LOGE(APP_LOG_TAG, "LCD upload failed");
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
vTaskSuspend(NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue