杰理方案AC79整合LVGL触屏显示效果

发布时间:2024年01月22日

demo_DevKitBoard

修改DevKitBoard.c


1.

代码:

SPI1_PLATFORM_DATA_BEGIN(spi1_data)
	.clk    = 96000000,
    .mode   = SPI_1WIRE_MODE,
    .port   = 'B',
    .attr   =  SPI_SCLK_L_UPL_SMPH | SPI_UNIDIR_MODE,//主机,CLK低 更新数据低,单向模式
SPI1_PLATFORM_DATA_END()

 2. 

代码:

static const struct ui_lcd_platform_data pdata = {
    .spi_id  = "spi1",
    .bl_pin = IO_PORTH_02,
    .cs_pin  = IO_PORTH_03,
    .rs_pin  = IO_PORTH_04,
    .rst_pin = IO_PORTH_05,

   	.touch_reset_pin = IO_PORTH_06,
   	.touch_int_pin = IO_PORTH_07,
	.te_pin  = -1,
    .lcd_if  = LCD_SPI,//屏幕接口类型还有 PAP , SPI
};

修改lcd_st7789v.c

1.

 

 代码 :

#define CONFIG_ST7789V_ID 4

 2.

代码:

#if TCFG_LCD_ST7789V_ENABLE//客户屏放最后
        lcd_w = 240;
        lcd_h = 280;
        lcd_bk_on = 1;
        lcd_bk_off = 0;
        lcd_choice = CONFIG_ST7789V_ID;
        printf("\n [lcd_drive] %s -[find_check_TM9486X] %d\n", __FUNCTION__, __LINE__);
#endif

屏幕花屏解决:

注释掉这行。

 

 lcd_st7789v.c没问题的代码 

#include "app_config.h"

#if LV_USE_PERF_MONITOR || LV_USE_MEM_MONITOR
#include "widgets/lv_label.h"
#endif

#ifdef USE_LVGL_UI_DEMO

#include "lv_conf.h"
#include "system/includes.h"
#include "lvgl.h"
#include "lv_demo_benchmark.h"
#include "lv_demo_widgets.h"
#include 
文章来源:https://blog.csdn.net/bug_love/article/details/135745031
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。