bouffalolab / bouffalo_sdk

BouffaloSDK is the IOT and MCU software development kit provided by the Bouffalo Lab Team, supports all the series of Bouffalo chips. Also it is the combination of bl_mcu_sdk and bl_iot_sdk
Apache License 2.0
372 stars 128 forks source link

Use QSPI interface on BL618 to light up WEA2012 screen #172

Closed modi12jin closed 1 year ago

modi12jin commented 1 year ago

mipi_dbi.zip

lcd.h

#elif defined LCD_DBI_WEA2012

#include "mipi_dbi/wea2012_dbi.h"
#define LCD_INTERFACE_TYPE           LCD_INTERFACE_DBI
#define LCD_W                        WEA2012_DBI_W
#define LCD_H                        WEA2012_DBI_H
#define LCD_COLOR_DEPTH              WEA2012_DBI_COLOR_DEPTH
#define _LCD_FUNC_DEFINE(_func, ...) wea2012_dbi_##_func(__VA_ARGS__)

lcd_conf.h

/* dbi wea2012 config */
#elif defined LCD_DBI_WEA2012

    /* Selecting interface type, more configuration of peripherals comes later
        1: DBI peripheral, supported functions: typeC-3wire, typeC-4wire, typeB-x8(8080); (support chips: bl616, bl606p, bl808),
    */
    #define LCD_DBI_INTERFACE_TYPE 1

    /* enable the lcd reset function
        0: Does not care about lcd hard reset
        1: use gpio to reset the lcd
    */
    #define LCD_RESET_EN 1

    /* Selecting pixel format
        1: rgb565 (16-bit, output rgb565)
        2: nrgb8888 (32-bit, output rgb888)
    */
    #define WEA2012_DBI_PIXEL_FORMAT 1

    /* WEA9341 LCD width and height */
    #define WEA2012_DBI_W 356
    #define WEA2012_DBI_H 400

    /* The offset of the area can be displayed */
    #define WEA2012_DBI_OFFSET_X 0
    #define WEA2012_DBI_OFFSET_Y 0

    /* Color reversal, Some screens are required
        0: disable
        1: enable
    */
   #define WEA2012_DBI_COLOR_REVERSAL 0

   #define DBI_QSPI_SUPPORT 1

wx_camera_1693474679508

bl618_wea2012-qspi_lvgl.zip