36 lines
693 B
C
36 lines
693 B
C
#include "displej.h"
|
|
|
|
void IRAM_ATTR lv_tick_task(void)
|
|
{
|
|
lv_tick_inc(portTICK_RATE_MS);
|
|
}
|
|
|
|
void disp(){
|
|
lv_init();
|
|
|
|
disp_spi_init();
|
|
ili9341_init();
|
|
|
|
static lv_color_t buf1[DISP_BUF_SIZE];
|
|
static lv_color_t buf2[DISP_BUF_SIZE];
|
|
static lv_disp_buf_t disp_buf;
|
|
lv_disp_buf_init(&disp_buf, buf1, buf2, DISP_BUF_SIZE);
|
|
|
|
lv_disp_drv_t disp_drv;
|
|
lv_disp_drv_init(&disp_drv);
|
|
disp_drv.flush_cb = ili9341_flush;
|
|
disp_drv.buffer = &disp_buf;
|
|
lv_disp_drv_register(&disp_drv);
|
|
esp_register_freertos_tick_hook(lv_tick_task);
|
|
|
|
//terminal_create();
|
|
//terminal_add("Hello\n");
|
|
//terminal_add("Hell\n");
|
|
sysmon_create();
|
|
while(1) {
|
|
vTaskDelay(1);
|
|
lv_task_handler();
|
|
}
|
|
}
|
|
|