代码:
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()
代码:
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
};
代码 :
#define CONFIG_ST7789V_ID 4
代码:
#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
注释掉这行。
#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