[bsp][imxrt1170] 移动 VGLite、video驱动文件到对应文件夹以提高代码可重用性 (#8092)
This commit is contained in:
parent
e6eddfa711
commit
61e38bd13d
|
@ -1012,6 +1012,7 @@ CONFIG_SOC_IMXRT1170_SERIES=y
|
|||
#
|
||||
CONFIG_BSP_USING_QSPIFLASH=y
|
||||
CONFIG_SOC_MIMXRT1176DVMAA=y
|
||||
# CONFIG_BSP_USING_LCD_MIPI is not set
|
||||
|
||||
#
|
||||
# On-chip Peripheral Drivers
|
||||
|
@ -1028,7 +1029,6 @@ CONFIG_BSP_USING_LPUART1=y
|
|||
# CONFIG_BSP_USING_LPUART3 is not set
|
||||
# CONFIG_BSP_USING_CAN is not set
|
||||
# CONFIG_BSP_USING_FLEXSPI is not set
|
||||
# CONFIG_BSP_USING_VGLITE is not set
|
||||
|
||||
#
|
||||
# Onboard Peripheral Drivers
|
||||
|
@ -1036,6 +1036,12 @@ CONFIG_BSP_USING_LPUART1=y
|
|||
# CONFIG_BSP_USING_SDRAM is not set
|
||||
# CONFIG_BSP_USING_ETH is not set
|
||||
# CONFIG_BSP_USING_FS is not set
|
||||
# CONFIG_BSP_USING_VGLITE is not set
|
||||
# CONFIG_DISPLAY_USING_RK055AHD091 is not set
|
||||
# CONFIG_DISPLAY_USING_RK055IQH091 is not set
|
||||
# CONFIG_DISPLAY_USING_RK055MHD091 is not set
|
||||
# CONFIG_BSP_USING_ELCDIF is not set
|
||||
# CONFIG_BSP_USING_LCDIFV2 is not set
|
||||
|
||||
#
|
||||
# Board extended module Drivers
|
||||
|
|
|
@ -12,6 +12,10 @@ config SOC_MIMXRT1176DVMAA
|
|||
select RT_USING_USER_MAIN
|
||||
default y
|
||||
|
||||
config BSP_USING_LCD_MIPI
|
||||
bool
|
||||
default n
|
||||
|
||||
menu "On-chip Peripheral Drivers"
|
||||
|
||||
config BSP_USING_DMA
|
||||
|
@ -141,42 +145,6 @@ menu "On-chip Peripheral Drivers"
|
|||
bool "Enable FLEXSPI2"
|
||||
default n
|
||||
endif
|
||||
|
||||
menuconfig BSP_USING_VGLITE
|
||||
bool "Enable VGLITE"
|
||||
select RT_USING_PIN
|
||||
default n
|
||||
|
||||
if BSP_USING_VGLITE
|
||||
choice
|
||||
prompt "Select lcd panel"
|
||||
default VGLITE_USING_RK055AHD091
|
||||
|
||||
config VGLITE_USING_RK055AHD091
|
||||
bool "RK055AHD091-CTG (RK055HDMIPI4M 720 * 1280)"
|
||||
|
||||
config VGLITE_USING_RK055IQH091
|
||||
bool "RK055IQH091-CTG (540 * 960)"
|
||||
|
||||
config VGLITE_USING_RK055MHD091
|
||||
bool "RK055MHD091A0-CTG (RK055HDMIPI4MA0 720 * 1280)"
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Select display controller"
|
||||
default VGLITE_USING_LCDIFV2
|
||||
|
||||
config VGLITE_USING_ELCDIF
|
||||
bool "ELCDIF"
|
||||
|
||||
config VGLITE_USING_LCDIFV2
|
||||
bool "LCDIFV2"
|
||||
endchoice
|
||||
|
||||
config VGLITE_USING_ELM
|
||||
bool "Enable Elementary"
|
||||
default y
|
||||
endif
|
||||
endmenu
|
||||
|
||||
menu "Onboard Peripheral Drivers"
|
||||
|
@ -259,6 +227,43 @@ menu "Onboard Peripheral Drivers"
|
|||
default n
|
||||
endif
|
||||
|
||||
menuconfig BSP_USING_VGLITE
|
||||
bool "Enable VGLite"
|
||||
select RT_USING_PIN
|
||||
select BSP_USING_LCD_MIPI
|
||||
default n
|
||||
|
||||
if BSP_USING_VGLITE
|
||||
choice
|
||||
prompt "Select display panel"
|
||||
default DISPLAY_USING_RK055AHD091
|
||||
|
||||
config DISPLAY_USING_RK055AHD091
|
||||
bool "RK055AHD091-CTG (RK055HDMIPI4M 720 * 1280)"
|
||||
|
||||
config DISPLAY_USING_RK055IQH091
|
||||
bool "RK055IQH091-CTG (540 * 960)"
|
||||
|
||||
config DISPLAY_USING_RK055MHD091
|
||||
bool "RK055MHD091A0-CTG (RK055HDMIPI4MA0 720 * 1280)"
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Select display controller"
|
||||
default BSP_USING_LCDIFV2
|
||||
|
||||
config BSP_USING_ELCDIF
|
||||
bool "ELCDIF"
|
||||
|
||||
config BSP_USING_LCDIFV2
|
||||
bool "LCDIFV2"
|
||||
endchoice
|
||||
|
||||
config VGLITE_USING_ELM
|
||||
bool "Enable Elementary"
|
||||
default y
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Board extended module Drivers"
|
||||
|
|
|
@ -10,6 +10,9 @@ MCUX_Config/clock_config.c
|
|||
MCUX_Config/pin_mux.c
|
||||
""")
|
||||
|
||||
if GetDepend(['BSP_USING_VGLITE']):
|
||||
src += ['display_support.c', 'vglite_support.c', 'vglite_window.c']
|
||||
|
||||
CPPPATH = [cwd,cwd + '/MCUX_Config',cwd + '/ports']
|
||||
CPPDEFINES = ['CPU_MIMXRT1176DVMAA_cm7', 'XIP_BOOT_HEADER_ENABLE=1', 'XIP_BOOT_HEADER_DCD_ENABLE=1', 'FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1','XIP_EXTERNAL_FLASH=1','ARM_MATH_CM7','USE_SDRAM']
|
||||
|
||||
|
|
|
@ -1315,10 +1315,10 @@ void imxrt_flexspi_pins_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_VGLITE
|
||||
void imxrt_lcd_pins_init(void)
|
||||
#ifdef BSP_USING_LCD_MIPI
|
||||
void imxrt_mipi_dsi_pins_init(void)
|
||||
{
|
||||
#ifdef BSP_USING_VGLITE
|
||||
#ifdef BSP_USING_LCD_MIPI
|
||||
CLOCK_EnableClock(kCLOCK_Iomuxc); /* LPCG on: LPCG is ON. */
|
||||
|
||||
IOMUXC_SetPinMux(
|
||||
|
@ -1379,8 +1379,8 @@ void rt_hw_board_init()
|
|||
imxrt_flexspi_pins_init();
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_VGLITE
|
||||
imxrt_lcd_pins_init();
|
||||
#ifdef BSP_USING_LCD_MIPI
|
||||
imxrt_mipi_dsi_pins_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ const MIPI_DSI_Type g_mipiDsi = {
|
|||
.dphy = DSI_HOST_DPHY_INTFC,
|
||||
};
|
||||
|
||||
#if defined(VGLITE_USING_RK055AHD091)
|
||||
#if defined(DISPLAY_USING_RK055AHD091)
|
||||
|
||||
static mipi_dsi_device_t dsiDevice = {
|
||||
.virtualChannel = 0,
|
||||
|
@ -68,7 +68,7 @@ static display_handle_t rm68200Handle = {
|
|||
.ops = &rm68200_ops,
|
||||
};
|
||||
|
||||
#elif defined(VGLITE_USING_RK055MHD091)
|
||||
#elif defined(DISPLAY_USING_RK055MHD091)
|
||||
|
||||
static mipi_dsi_device_t dsiDevice = {
|
||||
.virtualChannel = 0,
|
||||
|
@ -86,7 +86,7 @@ static display_handle_t hx8394Handle = {
|
|||
.ops = &hx8394_ops,
|
||||
};
|
||||
|
||||
#else
|
||||
#elif defined(DISPLAY_USING_RK055IQH091)
|
||||
|
||||
static mipi_dsi_device_t dsiDevice = {
|
||||
.virtualChannel = 0,
|
||||
|
@ -106,20 +106,19 @@ static display_handle_t rm68191Handle = {
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(VGLITE_USING_LCDIFV2)
|
||||
|
||||
#if defined(BSP_USING_LCDIFV2)
|
||||
static dc_fb_lcdifv2_handle_t s_dcFbLcdifv2Handle = {0};
|
||||
|
||||
static const dc_fb_lcdifv2_config_t s_dcFbLcdifv2Config = {
|
||||
.lcdifv2 = DEMO_LCDIF,
|
||||
.width = LCD_WIDTH,
|
||||
.height = LCD_HEIGHT,
|
||||
.hsw = LCD_HSW,
|
||||
.hfp = LCD_HFP,
|
||||
.hbp = LCD_HBP,
|
||||
.vsw = LCD_VSW,
|
||||
.vfp = LCD_VFP,
|
||||
.vbp = LCD_VBP,
|
||||
.width = LCD_MIPI_WIDTH,
|
||||
.height = LCD_MIPI_HEIGHT,
|
||||
.hsw = LCD_MIPI_HSW,
|
||||
.hfp = LCD_MIPI_HFP,
|
||||
.hbp = LCD_MIPI_HBP,
|
||||
.vsw = LCD_MIPI_VSW,
|
||||
.vfp = LCD_MIPI_VFP,
|
||||
.vbp = LCD_MIPI_VBP,
|
||||
.polarityFlags = DEMO_LCDIF_POL_FLAGS,
|
||||
.lineOrder = kLCDIFV2_LineOrderRGB,
|
||||
/* CM4 is domain 1, CM7 is domain 0. */
|
||||
|
@ -136,20 +135,20 @@ const dc_fb_t g_dc = {
|
|||
.config = &s_dcFbLcdifv2Config,
|
||||
};
|
||||
|
||||
#else
|
||||
#elif defined(BSP_USING_ELCDIF)
|
||||
|
||||
dc_fb_elcdif_handle_t s_dcFbElcdifHandle = {0}; /* The handle must be initialized to 0. */
|
||||
|
||||
const dc_fb_elcdif_config_t s_dcFbElcdifConfig = {
|
||||
.elcdif = DEMO_LCDIF,
|
||||
.width = LCD_WIDTH,
|
||||
.height = LCD_HEIGHT,
|
||||
.hsw = LCD_HSW,
|
||||
.hfp = LCD_HFP,
|
||||
.hbp = LCD_HBP,
|
||||
.vsw = LCD_VSW,
|
||||
.vfp = LCD_VFP,
|
||||
.vbp = LCD_VBP,
|
||||
.width = LCD_MIPI_WIDTH,
|
||||
.height = LCD_MIPI_HEIGHT,
|
||||
.hsw = LCD_MIPI_HSW,
|
||||
.hfp = LCD_MIPI_HFP,
|
||||
.hbp = LCD_MIPI_HBP,
|
||||
.vsw = LCD_MIPI_VSW,
|
||||
.vfp = LCD_MIPI_VFP,
|
||||
.vbp = LCD_MIPI_VBP,
|
||||
.polarityFlags = DEMO_LCDIF_POL_FLAGS,
|
||||
#if (!DEMO_USE_XRGB8888) && (DEMO_USE_LUT8)
|
||||
.dataBus = kELCDIF_DataBus8Bit,
|
||||
|
@ -195,7 +194,7 @@ static void BOARD_PullPanelPowerPin(bool pullUp)
|
|||
|
||||
static status_t BOARD_DSI_Transfer(dsi_transfer_t *xfer)
|
||||
{
|
||||
return DSI_TransferBlocking(DEMO_MIPI_DSI, xfer);
|
||||
return DSI_TransferBlocking(DEMO_LCD_MIPI, xfer);
|
||||
}
|
||||
|
||||
static void BOARD_InitLcdifClock(void)
|
||||
|
@ -209,19 +208,19 @@ static void BOARD_InitLcdifClock(void)
|
|||
const clock_root_config_t lcdifClockConfig = {
|
||||
.clockOff = false,
|
||||
.mux = 4, /*!< PLL_528. */
|
||||
#if (defined(VGLITE_USING_RK055AHD091) || defined(VGLITE_USING_RK055MHD091))
|
||||
#if (defined(DISPLAY_USING_RK055AHD091) || defined(DISPLAY_USING_RK055MHD091))
|
||||
.div = 9,
|
||||
#else
|
||||
#elif defined(DISPLAY_USING_RK055IQH091)
|
||||
.div = 15,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(VGLITE_USING_LCDIFV2)
|
||||
#if defined(BSP_USING_LCDIFV2)
|
||||
CLOCK_SetRootClock(kCLOCK_Root_Lcdifv2, &lcdifClockConfig);
|
||||
|
||||
mipiDsiDpiClkFreq_Hz = CLOCK_GetRootClockFreq(kCLOCK_Root_Lcdifv2);
|
||||
|
||||
#else
|
||||
#elif defined(BSP_USING_ELCDIF)
|
||||
|
||||
CLOCK_SetRootClock(kCLOCK_Root_Lcdif, &lcdifClockConfig);
|
||||
|
||||
|
@ -273,30 +272,26 @@ static status_t BOARD_InitLcdPanel(void)
|
|||
const gpio_pin_config_t pinConfig = {kGPIO_DigitalOutput, 0, kGPIO_NoIntmode};
|
||||
|
||||
const display_config_t displayConfig = {
|
||||
.resolution = FSL_VIDEO_RESOLUTION(LCD_WIDTH, LCD_HEIGHT),
|
||||
.hsw = LCD_HSW,
|
||||
.hfp = LCD_HFP,
|
||||
.hbp = LCD_HBP,
|
||||
.vsw = LCD_VSW,
|
||||
.vfp = LCD_VFP,
|
||||
.vbp = LCD_VBP,
|
||||
.resolution = FSL_VIDEO_RESOLUTION(LCD_MIPI_WIDTH, LCD_MIPI_HEIGHT),
|
||||
.hsw = LCD_MIPI_HSW,
|
||||
.hfp = LCD_MIPI_HFP,
|
||||
.hbp = LCD_MIPI_HBP,
|
||||
.vsw = LCD_MIPI_VSW,
|
||||
.vfp = LCD_MIPI_VFP,
|
||||
.vbp = LCD_MIPI_VBP,
|
||||
.controlFlags = 0,
|
||||
.dsiLanes = DEMO_MIPI_DSI_LANE_NUM,
|
||||
.dsiLanes = DEMO_LCD_MIPI_LANE_NUM,
|
||||
};
|
||||
|
||||
GPIO_PinInit(BOARD_MIPI_PANEL_POWER_GPIO, BOARD_MIPI_PANEL_POWER_PIN, &pinConfig);
|
||||
GPIO_PinInit(BOARD_MIPI_PANEL_BL_GPIO, BOARD_MIPI_PANEL_BL_PIN, &pinConfig);
|
||||
GPIO_PinInit(BOARD_MIPI_PANEL_RST_GPIO, BOARD_MIPI_PANEL_RST_PIN, &pinConfig);
|
||||
|
||||
#if defined(VGLITE_USING_RK055AHD091)
|
||||
#if defined(DISPLAY_USING_RK055AHD091)
|
||||
status = RM68200_Init(&rm68200Handle, &displayConfig);
|
||||
|
||||
#elif defined(VGLITE_USING_RK055MHD091)
|
||||
|
||||
#elif defined(DISPLAY_USING_RK055MHD091)
|
||||
status = HX8394_Init(&hx8394Handle, &displayConfig);
|
||||
|
||||
#else
|
||||
|
||||
#elif defined(DISPLAY_USING_RK055IQH091)
|
||||
status = RM68191_Init(&rm68191Handle, &displayConfig);
|
||||
#endif
|
||||
|
||||
|
@ -313,18 +308,18 @@ static void BOARD_SetMipiDsiConfig(void)
|
|||
dsi_config_t dsiConfig;
|
||||
dsi_dphy_config_t dphyConfig;
|
||||
|
||||
const dsi_dpi_config_t dpiConfig = {.pixelPayloadSize = LCD_WIDTH,
|
||||
const dsi_dpi_config_t dpiConfig = {.pixelPayloadSize = LCD_MIPI_WIDTH,
|
||||
.dpiColorCoding = kDSI_Dpi24Bit,
|
||||
.pixelPacket = kDSI_PixelPacket24Bit,
|
||||
.videoMode = kDSI_DpiBurst,
|
||||
.bllpMode = kDSI_DpiBllpLowPower,
|
||||
.polarityFlags = kDSI_DpiVsyncActiveLow | kDSI_DpiHsyncActiveLow,
|
||||
.hfp = LCD_HFP,
|
||||
.hbp = LCD_HBP,
|
||||
.hsw = LCD_HSW,
|
||||
.vfp = LCD_VFP,
|
||||
.vbp = LCD_VBP,
|
||||
.panelHeight = LCD_HEIGHT,
|
||||
.hfp = LCD_MIPI_HFP,
|
||||
.hbp = LCD_MIPI_HBP,
|
||||
.hsw = LCD_MIPI_HSW,
|
||||
.vfp = LCD_MIPI_VFP,
|
||||
.vbp = LCD_MIPI_VBP,
|
||||
.panelHeight = LCD_MIPI_HEIGHT,
|
||||
.virtualChannel = 0};
|
||||
|
||||
/*
|
||||
|
@ -337,11 +332,11 @@ static void BOARD_SetMipiDsiConfig(void)
|
|||
* dsiConfig.btaTo_ByteClk = 0;
|
||||
*/
|
||||
DSI_GetDefaultConfig(&dsiConfig);
|
||||
dsiConfig.numLanes = DEMO_MIPI_DSI_LANE_NUM;
|
||||
dsiConfig.numLanes = DEMO_LCD_MIPI_LANE_NUM;
|
||||
dsiConfig.autoInsertEoTp = true;
|
||||
|
||||
/* Init the DSI module. */
|
||||
DSI_Init(DEMO_MIPI_DSI, &dsiConfig);
|
||||
DSI_Init(DEMO_LCD_MIPI, &dsiConfig);
|
||||
|
||||
/* Init DPHY.
|
||||
*
|
||||
|
@ -355,26 +350,26 @@ static void BOARD_SetMipiDsiConfig(void)
|
|||
*
|
||||
* Note that the DSI output pixel is 24bit per pixel.
|
||||
*/
|
||||
mipiDsiDphyBitClkFreq_Hz = mipiDsiDpiClkFreq_Hz * (24 / DEMO_MIPI_DSI_LANE_NUM);
|
||||
mipiDsiDphyBitClkFreq_Hz = mipiDsiDpiClkFreq_Hz * (24 / DEMO_LCD_MIPI_LANE_NUM);
|
||||
|
||||
mipiDsiDphyBitClkFreq_Hz = DEMO_MIPI_DPHY_BIT_CLK_ENLARGE(mipiDsiDphyBitClkFreq_Hz);
|
||||
|
||||
DSI_GetDphyDefaultConfig(&dphyConfig, mipiDsiDphyBitClkFreq_Hz, mipiDsiTxEscClkFreq_Hz);
|
||||
|
||||
mipiDsiDphyBitClkFreq_Hz = DSI_InitDphy(DEMO_MIPI_DSI, &dphyConfig, mipiDsiDphyRefClkFreq_Hz);
|
||||
mipiDsiDphyBitClkFreq_Hz = DSI_InitDphy(DEMO_LCD_MIPI, &dphyConfig, mipiDsiDphyRefClkFreq_Hz);
|
||||
|
||||
/* Init DPI interface. */
|
||||
DSI_SetDpiConfig(DEMO_MIPI_DSI, &dpiConfig, DEMO_MIPI_DSI_LANE_NUM, mipiDsiDpiClkFreq_Hz, mipiDsiDphyBitClkFreq_Hz);
|
||||
DSI_SetDpiConfig(DEMO_LCD_MIPI, &dpiConfig, DEMO_LCD_MIPI_LANE_NUM, mipiDsiDpiClkFreq_Hz, mipiDsiDphyBitClkFreq_Hz);
|
||||
}
|
||||
|
||||
status_t BOARD_InitDisplayInterface(void)
|
||||
{
|
||||
CLOCK_EnableClock(kCLOCK_Video_Mux);
|
||||
|
||||
#if defined(VGLITE_USING_LCDIFV2)
|
||||
#if defined(BSP_USING_LCDIFV2)
|
||||
/* LCDIF v2 output to MIPI DSI. */
|
||||
VIDEO_MUX->VID_MUX_CTRL.SET = VIDEO_MUX_VID_MUX_CTRL_MIPI_DSI_SEL_MASK;
|
||||
#else
|
||||
#elif defined(BSP_USING_ELCDIF)
|
||||
/* ELCDIF output to MIPI DSI. */
|
||||
VIDEO_MUX->VID_MUX_CTRL.CLR = VIDEO_MUX_VID_MUX_CTRL_MIPI_DSI_SEL_MASK;
|
||||
#endif
|
||||
|
@ -405,12 +400,12 @@ status_t BOARD_InitDisplayInterface(void)
|
|||
return BOARD_InitLcdPanel();
|
||||
}
|
||||
|
||||
#if defined(VGLITE_USING_LCDIFV2)
|
||||
#if defined(BSP_USING_LCDIFV2)
|
||||
void LCDIFv2_IRQHandler(void)
|
||||
{
|
||||
DC_FB_LCDIFV2_IRQHandler(&g_dc);
|
||||
}
|
||||
#else
|
||||
#elif defined(BSP_USING_ELCDIF)
|
||||
void eLCDIF_IRQHandler(void)
|
||||
{
|
||||
DC_FB_ELCDIF_IRQHandler(&g_dc);
|
||||
|
@ -449,7 +444,6 @@ status_t BOARD_PrepareDisplayController(void)
|
|||
|
||||
if (status != kStatus_Success)
|
||||
{
|
||||
// PRINTF("Error: Invalid display clock source.\r\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -459,11 +453,11 @@ status_t BOARD_PrepareDisplayController(void)
|
|||
|
||||
if (kStatus_Success == status)
|
||||
{
|
||||
#if defined(VGLITE_USING_LCDIFV2)
|
||||
#if defined(BSP_USING_LCDIFV2)
|
||||
NVIC_ClearPendingIRQ(LCDIFv2_IRQn);
|
||||
NVIC_SetPriority(LCDIFv2_IRQn, 3);
|
||||
EnableIRQ(LCDIFv2_IRQn);
|
||||
#else
|
||||
#elif defined(BSP_USING_ELCDIF)
|
||||
NVIC_ClearPendingIRQ(eLCDIF_IRQn);
|
||||
NVIC_SetPriority(eLCDIF_IRQn, 3);
|
||||
EnableIRQ(eLCDIF_IRQn);
|
|
@ -12,11 +12,11 @@
|
|||
|
||||
#include "fsl_dc_fb.h"
|
||||
|
||||
#if defined(VGLITE_USING_RK055AHD091)
|
||||
#if defined(DISPLAY_USING_RK055AHD091)
|
||||
#include "fsl_rm68200.h"
|
||||
#elif defined(VGLITE_USING_RK055IQH091)
|
||||
#elif defined(DISPLAY_USING_RK055IQH091)
|
||||
#include "fsl_rm68191.h"
|
||||
#elif defined(VGLITE_USING_RK055MHD091)
|
||||
#elif defined(DISPLAY_USING_RK055MHD091)
|
||||
#include "fsl_hx8394.h"
|
||||
#else
|
||||
#error "Please config lcd panel parameters."
|
||||
|
@ -24,9 +24,9 @@
|
|||
#include "pin_mux.h"
|
||||
#include "board.h"
|
||||
|
||||
#if defined(VGLITE_USING_LCDIFV2)
|
||||
#if defined(BSP_USING_LCDIFV2)
|
||||
#include "fsl_dc_fb_lcdifv2.h"
|
||||
#else
|
||||
#elif defined(BSP_USING_ELCDIF)
|
||||
#include "fsl_dc_fb_elcdif.h"
|
||||
#endif
|
||||
|
||||
|
@ -69,20 +69,20 @@
|
|||
#define DEMO_BUFFER_BYTE_PER_PIXEL 2
|
||||
#endif
|
||||
|
||||
#if (defined(VGLITE_USING_RK055AHD091) || defined(VGLITE_USING_RK055MHD091))
|
||||
#if (defined(DISPLAY_USING_RK055AHD091) || defined(DISPLAY_USING_RK055MHD091))
|
||||
|
||||
#define LCD_WIDTH (720)
|
||||
#define LCD_HEIGHT (1280)
|
||||
#define LCD_MIPI_WIDTH (720)
|
||||
#define LCD_MIPI_HEIGHT (1280)
|
||||
|
||||
#elif defined(VGLITE_USING_RK055IQH091)
|
||||
#elif defined(DISPLAY_USING_RK055IQH091)
|
||||
|
||||
#define LCD_WIDTH (540)
|
||||
#define LCD_HEIGHT (960)
|
||||
#define LCD_MIPI_WIDTH (540)
|
||||
#define LCD_MIPI_HEIGHT (960)
|
||||
|
||||
#endif
|
||||
|
||||
#define DEMO_BUFFER_WIDTH LCD_WIDTH
|
||||
#define DEMO_BUFFER_HEIGHT LCD_HEIGHT
|
||||
#define DEMO_BUFFER_WIDTH LCD_MIPI_WIDTH
|
||||
#define DEMO_BUFFER_HEIGHT LCD_MIPI_HEIGHT
|
||||
|
||||
/* Where the frame buffer is shown in the screen. */
|
||||
#define DEMO_BUFFER_START_X 0U
|
||||
|
@ -110,47 +110,47 @@
|
|||
* MIPI panel pin for RT-Thread
|
||||
*/
|
||||
#define GET_PIN(PORTx, PIN) (32 * (PORTx - 1) + (PIN & 31)) /* PORTx:1,2,3,4,5 */
|
||||
#define LCD_RST_GPIO_PORT (3U)
|
||||
#define LCD_RST_GPIO_PIN (1U)
|
||||
#define LCD_RST_PIN GET_PIN(LCD_RST_GPIO_PORT, LCD_RST_GPIO_PIN)
|
||||
#define LCD_MIPI_RST_GPIO_PORT (3U)
|
||||
#define LCD_MIPI_RST_GPIO_PIN (1U)
|
||||
#define LCD_MIPI_RST_PIN GET_PIN(LCD_MIPI_RST_GPIO_PORT, LCD_MIPI_RST_GPIO_PIN)
|
||||
/* Back light pin. */
|
||||
#define LCD_BL_GPIO_PORT (3U)
|
||||
#define LCD_BL_GPIO_PIN (29U)
|
||||
#define LCD_BL_PIN GET_PIN(LCD_BL_GPIO_PORT, LCD_BL_GPIO_PIN)
|
||||
#define LCD_MIPI_BL_GPIO_PORT (3U)
|
||||
#define LCD_MIPI_BL_GPIO_PIN (29U)
|
||||
#define LCD_MIPI_BL_PIN GET_PIN(LCD_MIPI_BL_GPIO_PORT, LCD_MIPI_BL_GPIO_PIN)
|
||||
|
||||
/*
|
||||
* RK055AHD091 panel
|
||||
*/
|
||||
|
||||
#if defined(VGLITE_USING_RK055AHD091)
|
||||
#define LCD_HSW 8
|
||||
#define LCD_HFP 32
|
||||
#define LCD_HBP 32
|
||||
#define LCD_VSW 2
|
||||
#define LCD_VFP 16
|
||||
#define LCD_VBP 14
|
||||
#if defined(DISPLAY_USING_RK055AHD091)
|
||||
#define LCD_MIPI_HSW 8
|
||||
#define LCD_MIPI_HFP 32
|
||||
#define LCD_MIPI_HBP 32
|
||||
#define LCD_MIPI_VSW 2
|
||||
#define LCD_MIPI_VFP 16
|
||||
#define LCD_MIPI_VBP 14
|
||||
|
||||
#elif defined(VGLITE_USING_RK055IQH091)
|
||||
#elif defined(DISPLAY_USING_RK055IQH091)
|
||||
|
||||
#define LCD_HSW 2
|
||||
#define LCD_HFP 32
|
||||
#define LCD_HBP 30
|
||||
#define LCD_VSW 2
|
||||
#define LCD_VFP 16
|
||||
#define LCD_VBP 14
|
||||
#define LCD_MIPI_HSW 2
|
||||
#define LCD_MIPI_HFP 32
|
||||
#define LCD_MIPI_HBP 30
|
||||
#define LCD_MIPI_VSW 2
|
||||
#define LCD_MIPI_VFP 16
|
||||
#define LCD_MIPI_VBP 14
|
||||
|
||||
#elif defined(VGLITE_USING_RK055MHD091)
|
||||
#elif defined(DISPLAY_USING_RK055MHD091)
|
||||
|
||||
#define LCD_HSW 6
|
||||
#define LCD_HFP 12
|
||||
#define LCD_HBP 24
|
||||
#define LCD_VSW 2
|
||||
#define LCD_VFP 16
|
||||
#define LCD_VBP 14
|
||||
#define LCD_MIPI_HSW 6
|
||||
#define LCD_MIPI_HFP 12
|
||||
#define LCD_MIPI_HBP 24
|
||||
#define LCD_MIPI_VSW 2
|
||||
#define LCD_MIPI_VFP 16
|
||||
#define LCD_MIPI_VBP 14
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(VGLITE_USING_LCDIFV2)
|
||||
#if defined(BSP_USING_LCDIFV2)
|
||||
|
||||
#define DEMO_LCDIF_POL_FLAGS \
|
||||
(kLCDIFV2_DataEnableActiveHigh | kLCDIFV2_VsyncActiveLow | kLCDIFV2_HsyncActiveLow | \
|
||||
|
@ -158,7 +158,7 @@
|
|||
|
||||
#define DEMO_LCDIF LCDIFV2
|
||||
|
||||
#else
|
||||
#elif defined(BSP_USING_ELCDIF)
|
||||
|
||||
#define DEMO_LCDIF_POL_FLAGS \
|
||||
(kELCDIF_DataEnableActiveHigh | kELCDIF_VsyncActiveLow | kELCDIF_HsyncActiveLow | kELCDIF_DriveDataOnFallingClkEdge)
|
||||
|
@ -168,8 +168,8 @@
|
|||
#endif
|
||||
|
||||
/* Definitions for MIPI. */
|
||||
#define DEMO_MIPI_DSI (&g_mipiDsi)
|
||||
#define DEMO_MIPI_DSI_LANE_NUM 2
|
||||
#define DEMO_LCD_MIPI (&g_mipiDsi)
|
||||
#define DEMO_LCD_MIPI_LANE_NUM 2
|
||||
|
||||
extern const dc_fb_t g_dc;
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
#include <rtthread.h>
|
||||
|
||||
#include "vglite_support.h"
|
||||
#include "vg_lite_platform.h"
|
||||
#include "vglite_window.h"
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
#if !DEMO_BUFFER_FIXED_ADDRESS
|
||||
AT_NONCACHEABLE_SECTION_ALIGN(
|
||||
static uint8_t s_frameBuffer[APP_BUFFER_COUNT][LCD_HEIGHT][LCD_WIDTH][DEMO_BUFFER_BYTE_PER_PIXEL],
|
||||
static uint8_t s_frameBuffer[APP_BUFFER_COUNT][DEMO_BUFFER_HEIGHT][DEMO_BUFFER_WIDTH][DEMO_BUFFER_BYTE_PER_PIXEL],
|
||||
FRAME_BUFFER_ALIGN);
|
||||
|
||||
#define DEMO_BUFFER0_ADDR (uint32_t) s_frameBuffer[0]
|
||||
|
@ -79,7 +79,6 @@ vg_lite_error_t VGLITE_CreateDisplay(vg_lite_display_t *display)
|
|||
if (!display)
|
||||
return VG_LITE_INVALID_ARGUMENT;
|
||||
|
||||
BOARD_PrepareDisplayController();
|
||||
FBDEV_Open(&display->g_fbdev, &g_dc, 0);
|
||||
|
||||
return VG_LITE_SUCCESS;
|
|
@ -1408,10 +1408,10 @@
|
|||
<group>
|
||||
<name>xip</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\xip\evkmimxrt1170_flexspi_nor_config.c</name>
|
||||
<name>$PROJ_DIR$\xip\fsl_flexspi_nor_boot.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\xip\fsl_flexspi_nor_boot.c</name>
|
||||
<name>$PROJ_DIR$\xip\evkmimxrt1170_flexspi_nor_config.c</name>
|
||||
</file>
|
||||
</group>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
from building import *
|
||||
|
||||
src = []
|
||||
cwd = GetCurrentDir()
|
||||
path = [cwd]
|
||||
CPPDEFINES = []
|
||||
|
||||
if GetDepend(['BSP_USING_LCD_MIPI']):
|
||||
|
||||
path += [cwd + '/display', cwd + '/display/dc', cwd + '/display/fbdev', cwd + '/display/mipi_dsi_cmd']
|
||||
|
||||
src += ['fsl_video_common.c']
|
||||
src += ['display/fbdev/fsl_fbdev.c']
|
||||
src += ['display/mipi_dsi_cmd/fsl_mipi_dsi_cmd.c']
|
||||
|
||||
if GetDepend(['BSP_USING_LCDIFV2']):
|
||||
src += ['display/dc/lcdifv2/fsl_dc_fb_lcdifv2.c']
|
||||
path += [cwd + '/display/dc/lcdifv2']
|
||||
elif GetDepend(['BSP_USING_ELCDIF']):
|
||||
src += ['display/dc/elcdif/fsl_dc_fb_elcdif.c']
|
||||
path += [cwd + '/display/dc/elcdif']
|
||||
|
||||
if GetDepend(['DISPLAY_USING_RK055AHD091']):
|
||||
src += ['display/rm68200/fsl_rm68200.c']
|
||||
path += [cwd + '/display/rm68200']
|
||||
elif GetDepend(['DISPLAY_USING_RK055IQH091']):
|
||||
src += ['display/rm68191/fsl_rm68191.c']
|
||||
path += [cwd + '/display/rm68191']
|
||||
elif GetDepend(['DISPLAY_USING_RK055MHD091']):
|
||||
src += ['display/hx8394/fsl_hx8394.c']
|
||||
path += [cwd + '/display/hx8394']
|
||||
|
||||
group = DefineGroup('video', src, depend = [''], CPPPATH = path, CPPDEFINES=CPPDEFINES)
|
||||
|
||||
Return('group')
|
||||
else:
|
||||
empty_list = []
|
||||
Return('empty_list')
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
#include "fsl_dc_fb_lcdifv2.h"
|
||||
#if defined(SDK_OS_RTOS)
|
||||
#if defined(USE_RTOS)
|
||||
#include "rtthread.h"
|
||||
#endif
|
||||
|
||||
|
@ -144,7 +144,7 @@ status_t DC_FB_LCDIFV2_EnableLayer(const dc_fb_t *dc, uint8_t layer)
|
|||
|
||||
while (true == dcHandle->layers[layer].shadowLoadPending)
|
||||
{
|
||||
#if defined(SDK_OS_RTOS)
|
||||
#if defined(USE_RTOS)
|
||||
rt_thread_delay(1);
|
||||
#endif
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
#include "fsl_video_common.h"
|
||||
#if defined(SDK_OS_RTOS)
|
||||
#if defined(USE_RTOS)
|
||||
#include "rtthread.h"
|
||||
#endif
|
||||
|
||||
|
@ -31,7 +31,7 @@ bool VIDEO_IsYUV(video_pixel_format_t format)
|
|||
|
||||
void VIDEO_DelayMs(uint32_t ms)
|
||||
{
|
||||
#if defined(SDK_OS_RTOS)
|
||||
#if defined(USE_RTOS)
|
||||
rt_thread_mdelay(ms);
|
||||
#else
|
||||
while (0U != (ms--))
|
|
@ -53,62 +53,10 @@ if GetDepend(['BSP_USING_FLEXSPI']):
|
|||
src += ['MIMXRT1176/drivers/fsl_flexspi.c']
|
||||
|
||||
if GetDepend(['BSP_USING_VGLITE']):
|
||||
src += ['MIMXRT1176/drivers/fsl_soc_src.c']
|
||||
src += ['MIMXRT1176/drivers/fsl_mipi_dsi.c']
|
||||
src += ['MIMXRT1176/drivers/fsl_video_common.c']
|
||||
src += ['MIMXRT1176/drivers/display_support.c']
|
||||
src += ['MIMXRT1176/drivers/fsl_fbdev.c']
|
||||
src += ['MIMXRT1176/drivers/fsl_mipi_dsi_cmd.c']
|
||||
src += ['MIMXRT1176/drivers/fsl_soc_src.c', 'MIMXRT1176/drivers/fsl_mipi_dsi.c']
|
||||
|
||||
if GetDepend(['VGLITE_USING_LCDIFV2']):
|
||||
src += ['MIMXRT1176/drivers/fsl_dc_fb_lcdifv2.c']
|
||||
src += ['MIMXRT1176/drivers/fsl_lcdifv2.c']
|
||||
else:
|
||||
src += ['MIMXRT1176/drivers/fsl_dc_fb_elcdif.c']
|
||||
src += ['MIMXRT1176/drivers/fsl_elcdif.c']
|
||||
|
||||
if GetDepend(['VGLITE_USING_RK055AHD091']):
|
||||
src += ['MIMXRT1176/drivers/fsl_rm68200.c']
|
||||
elif GetDepend(['VGLITE_USING_RK055IQH091']):
|
||||
src += ['MIMXRT1176/drivers/fsl_rm68191.c']
|
||||
else:
|
||||
src += ['MIMXRT1176/drivers/fsl_hx8394.c']
|
||||
|
||||
src += ['MIMXRT1176/drivers/mf_bwfont.c']
|
||||
src += ['MIMXRT1176/drivers/mf_encoding.c']
|
||||
src += ['MIMXRT1176/drivers/mf_font.c']
|
||||
src += ['MIMXRT1176/drivers/mf_justify.c']
|
||||
src += ['MIMXRT1176/drivers/mf_kerning.c']
|
||||
src += ['MIMXRT1176/drivers/mf_rlefont.c']
|
||||
src += ['MIMXRT1176/drivers/mf_scaledfont.c']
|
||||
src += ['MIMXRT1176/drivers/mf_wordwrap.c']
|
||||
|
||||
src += ['MIMXRT1176/drivers/buf_reader.c']
|
||||
src += ['MIMXRT1176/drivers/rle_font_read.c']
|
||||
src += ['MIMXRT1176/drivers/vft_debug.c']
|
||||
src += ['MIMXRT1176/drivers/vft_draw.c']
|
||||
src += ['MIMXRT1176/drivers/vg_lite_text.c']
|
||||
|
||||
src += ['MIMXRT1176/drivers/vg_lite_os.c']
|
||||
src += ['MIMXRT1176/drivers/vg_lite.c']
|
||||
src += ['MIMXRT1176/drivers/vg_lite_flat.c']
|
||||
src += ['MIMXRT1176/drivers/vg_lite_image.c']
|
||||
src += ['MIMXRT1176/drivers/vg_lite_matrix.c']
|
||||
src += ['MIMXRT1176/drivers/vg_lite_path.c']
|
||||
|
||||
src += ['MIMXRT1176/drivers/vglite_support.c']
|
||||
src += ['MIMXRT1176/drivers/vglite_window.c']
|
||||
|
||||
src += ['MIMXRT1176/drivers/vg_lite_hal.c']
|
||||
src += ['MIMXRT1176/drivers/vg_lite_kernel.c']
|
||||
|
||||
if GetDepend(['VGLITE_USING_ELM']):
|
||||
src += ['MIMXRT1176/drivers/elm_buffer.c']
|
||||
src += ['MIMXRT1176/drivers/elm_draw.c']
|
||||
src += ['MIMXRT1176/drivers/elm_init.c']
|
||||
src += ['MIMXRT1176/drivers/elm_object.c']
|
||||
src += ['MIMXRT1176/drivers/elm_os.c']
|
||||
src += ['MIMXRT1176/drivers/elm_text.c']
|
||||
if GetDepend(['BSP_USING_LCDIFV2']) or GetDepend(['BSP_USING_ELCDIF']):
|
||||
src += ['MIMXRT1176/drivers/fsl_lcdifv2.c', 'MIMXRT1176/drivers/fsl_elcdif.c']
|
||||
|
||||
#fsl os abstract files
|
||||
src += ['MIMXRT1176/drivers/fsl_os_abstraction_rtthread.c']
|
||||
|
|
|
@ -2,10 +2,13 @@ from building import *
|
|||
|
||||
src = []
|
||||
cwd = []
|
||||
|
||||
CPPDEFINES = []
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
|
||||
path = [cwd]
|
||||
|
||||
if GetDepend('BSP_USING_GPIO'):
|
||||
src += ['drv_gpio.c']
|
||||
|
||||
|
@ -80,8 +83,23 @@ if GetDepend('BSP_USING_PULSE_ENCODER'):
|
|||
if GetDepend('BSP_USING_FLEXSPI'):
|
||||
src += ['drv_flexspi.c']
|
||||
|
||||
if GetDepend('BSP_USING_LCD_MIPI'):
|
||||
src += ['drv_lcd_mipi.c']
|
||||
|
||||
if GetDepend(['BSP_USING_VGLITE']):
|
||||
src += Glob('vglite/font/*.c')
|
||||
src += Glob('vglite/font/mcufont/decoder/*.c')
|
||||
src += Glob('vglite/VGLite/rtos/*.c')
|
||||
src += Glob('vglite/VGLite/*.c')
|
||||
src += Glob('vglite/VGLiteKernel/rtos/*.c')
|
||||
src += Glob('vglite/VGLiteKernel/*.c')
|
||||
path += [cwd + '/vglite/font', cwd + '/vglite/font/mcufont/decoder', cwd + '/vglite/inc', cwd + '/vglite/VGLite', cwd + '/vglite/VGLite/rtos', cwd + '/vglite/VGLiteKernel', cwd + '/vglite/VGLiteKernel/rtos']
|
||||
|
||||
if GetDepend(['VGLITE_USING_ELM']):
|
||||
src += Glob('vglite/elementary/src/*.c')
|
||||
path += [cwd + '/vglite/elementary/inc', cwd + '/vglite/elementary/src']
|
||||
|
||||
src += ['drv_common.c']
|
||||
path = [cwd]
|
||||
|
||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES=CPPDEFINES)
|
||||
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2017-10-30 Tanek the first version
|
||||
* 2023-09-25 Frogrey export MIPI DSI config parameters.
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifdef BSP_USING_LCD_MIPI
|
||||
|
||||
#include "display_support.h"
|
||||
#include "drv_lcd_mipi.h"
|
||||
#include "fsl_common.h"
|
||||
#include "fsl_iomuxc.h"
|
||||
#include "fsl_elcdif.h"
|
||||
#include "drv_gpio.h"
|
||||
|
||||
#define LOG_TAG "drv.lcd_mipi"
|
||||
#include <drv_log.h>
|
||||
|
||||
#if !defined(LCD_MIPI_WIDTH) || !defined(LCD_MIPI_HEIGHT)
|
||||
#error "Please config mipi dsi pixel parameters."
|
||||
#endif
|
||||
|
||||
#if !defined(LCD_MIPI_HFP) || !defined(LCD_MIPI_HBP) || !defined(LCD_MIPI_HSW) || \
|
||||
!defined(LCD_MIPI_VFP) || !defined(LCD_MIPI_VBP) || !defined(LCD_MIPI_VSW)
|
||||
#error "Please config mipi dsi timing parameters."
|
||||
#endif
|
||||
|
||||
#if !defined(LCD_MIPI_BL_PIN) || !defined(LCD_MIPI_RST_PIN)
|
||||
#error "Please config mipi dsi backlight or reset pin."
|
||||
#endif
|
||||
|
||||
struct imxrt_lcd_mipi
|
||||
{
|
||||
struct rt_device device;
|
||||
struct rt_device_graphic_info info;
|
||||
};
|
||||
|
||||
static struct imxrt_lcd_mipi lcd_mipi;
|
||||
|
||||
static rt_err_t imxrt_lcd_mipi_init(rt_device_t device)
|
||||
{
|
||||
RT_ASSERT(device != RT_NULL);
|
||||
|
||||
BOARD_PrepareDisplayController();
|
||||
|
||||
/* MIPI DSI DEVICE INFORMATION*/
|
||||
lcd_mipi.info.width = LCD_MIPI_WIDTH;
|
||||
lcd_mipi.info.height = LCD_MIPI_HEIGHT;
|
||||
#if DEMO_USE_XRGB8888
|
||||
lcd_mipi.info.pixel_format = RTGRAPHIC_PIXEL_FORMAT_ARGB888;
|
||||
lcd_mipi.info.bits_per_pixel = 32;
|
||||
#elif DEMO_USE_RGB565
|
||||
lcd_mipi.info.pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565;
|
||||
lcd_mipi.info.bits_per_pixel = 16;
|
||||
#else
|
||||
lcd_mipi.info.bits_per_pixel = 16;
|
||||
#endif
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t imxrt_lcd_mipi_control(rt_device_t device, int cmd, void *args)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
case RTGRAPHIC_CTRL_RECT_UPDATE:
|
||||
break;
|
||||
|
||||
case RTGRAPHIC_CTRL_POWERON:
|
||||
rt_pin_write(LCD_MIPI_BL_PIN, PIN_HIGH);
|
||||
break;
|
||||
|
||||
case RTGRAPHIC_CTRL_POWEROFF:
|
||||
rt_pin_write(LCD_MIPI_BL_PIN, PIN_LOW);
|
||||
break;
|
||||
|
||||
case RTGRAPHIC_CTRL_GET_INFO:
|
||||
rt_memcpy(args, &lcd_mipi.info, sizeof(lcd_mipi.info));
|
||||
break;
|
||||
|
||||
case RTGRAPHIC_CTRL_SET_MODE:
|
||||
break;
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
int rt_hw_lcd_mipi_init(void)
|
||||
{
|
||||
rt_err_t ret;
|
||||
|
||||
lcd_mipi.device.type = RT_Device_Class_Graphic;
|
||||
lcd_mipi.device.init = imxrt_lcd_mipi_init;
|
||||
lcd_mipi.device.open = RT_NULL;
|
||||
lcd_mipi.device.close = RT_NULL;
|
||||
lcd_mipi.device.read = RT_NULL;
|
||||
lcd_mipi.device.write = RT_NULL;
|
||||
lcd_mipi.device.control = imxrt_lcd_mipi_control;
|
||||
|
||||
lcd_mipi.device.user_data = (void *)&lcd_mipi.info;
|
||||
|
||||
ret = rt_device_register(&lcd_mipi.device, "lcd_mipi", RT_DEVICE_FLAG_RDWR);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
INIT_DEVICE_EXPORT(rt_hw_lcd_mipi_init);
|
||||
|
||||
#endif /* BSP_USING_LCD_MIPI */
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2018-04-05 Liuguang the first version.
|
||||
*/
|
||||
|
||||
#ifndef __DRV_LCD_H__
|
||||
#define __DRV_LCD_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
int rt_hw_lcd_init(void);
|
||||
|
||||
#endif
|
|
@ -90,7 +90,7 @@ void command_queue(void * parameters)
|
|||
if(os_obj.queue_handle->entry)
|
||||
{
|
||||
len = rt_mq_recv(os_obj.queue_handle, (void*) &peek_queue, os_obj.queue_handle->msg_size, (rt_int32_t) ((rt_int64_t)THREAD_WAIT_TIME * RT_TICK_PER_SECOND / 1000));
|
||||
if(len != 0)
|
||||
if(len)
|
||||
{
|
||||
#if defined(PRINT_COMMAND_BUFFER)
|
||||
int i = 0;
|
Loading…
Reference in New Issue