Skip to content

Commit

Permalink
update:lcd demo适配tp操作
Browse files Browse the repository at this point in the history
  • Loading branch information
allewalker committed Jan 16, 2025
1 parent d78a7ce commit 3310cd6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
2 changes: 1 addition & 1 deletion interface/src/luat_lcd_ec7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void luat_lcd_service_init(uint32_t pro)
if (!g_s_lcd.task_handle)
{
g_s_lcd.mem_type = LUAT_HEAP_AUTO;
g_s_lcd.task_handle = create_event_task(prvLCD_Task, NULL, 2048, pro, 0, "lcdSer");
g_s_lcd.task_handle = create_event_task(prvLCD_Task, NULL, 4096, pro, 0, "lcdSer");
g_s_lcd.camera_show_stop_sem = OS_MutexCreate();
}
}
Expand Down
57 changes: 34 additions & 23 deletions project/example_lcd/src/example_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,33 @@ static luat_lcd_conf_t lcd_conf = {
.interface_mode = LUAT_LCD_IM_4_WIRE_8_BIT_INTERFACE_I,
.lcd_cs_pin = 0xff, //注意不用的时候写0xff
};

//static luat_lcd_conf_t lcd_conf = {
// .port = LUAT_LCD_HW_ID_0,
// .lcd_spi_device = NULL,
// .auto_flush = 1,
// .opts = &lcd_opts_jd9261t_inited,
// .pin_dc = 0xff,
// .pin_rst = LCD_RST,
// .pin_pwr = LCD_PWR,
// .direction = 0,
// .w = 480,
// .h = 480,
// .xoffset = 0,
// .yoffset = 0,
// .interface_mode = LUAT_LCD_IM_QSPI_MODE,
// .lcd_cs_pin = 0xff, //注意不用的时候写0xff
// .bus_speed = 60000000,
// .flush_rate = 658,
// .vbp = 19,
// .vfp = 108,
// .vs = 2,
//};
#if 0
static luat_lcd_conf_t lcd_conf = {
.port = LUAT_LCD_HW_ID_0,
.lcd_spi_device = NULL,
.auto_flush = 1,
.opts = &lcd_opts_jd9261t_inited,
.pin_dc = 0xff,
.pin_rst = LCD_RST,
.pin_pwr = LCD_PWR,
.direction = 0,
.w = 480,
.h = 480,
.xoffset = 0,
.yoffset = 0,
.interface_mode = LUAT_LCD_IM_QSPI_MODE,
.lcd_cs_pin = 0xff, //注意不用的时候写0xff
.bus_speed = 60000000,
.flush_rate = 658,
.vbp = 19,
.vfp = 108,
.vs = 2,
.tp_driver_id = 0,//填非0值开启
.tp_i2c_id = 1,
.tp_pin_rst = 0xff,
.tp_pin_irq = HAL_WAKEUP_4,
};
#endif
#else
static luat_spi_device_t lcd_spi_dev = {
.bus_id = LCD_SPI,
Expand Down Expand Up @@ -136,5 +141,11 @@ static void task_demo_lcd(void)

INIT_TASK_EXPORT(task_demo_lcd,"1");


#ifndef LUAT_USE_LCD_SERVICE
static void lcd_service_task_init(void)
{
luat_lcd_service_init(90);
}
INIT_TASK_EXPORT(lcd_service_task_init, "1");
#endif

0 comments on commit 3310cd6

Please sign in to comment.