WebRadioApp  0.1
EW_BSP_DISPLAY
Collaboration diagram for EW_BSP_DISPLAY:

Data Structures

struct  XDisplayInfo
 

Macros

#define LAYER_INDEX   0
 
#define VSYNC   1
 
#define VBP   1
 
#define VFP   1
 
#define HSYNC   1
 
#define HBP   1
 
#define HFP   1
 
#define NO_AREA   0
 
#define LEFT_AREA   1
 
#define RIGHT_AREA   2
 
#define hltdc_handle   hlcd_ltdc
 
#define hdsi_handle   hlcd_dsi
 
#define __DSI_MASK_TE()   (GPIOJ->AFR[0] &= (0xFFFFF0FFU))
 
#define __DSI_UNMASK_TE()
 
#define DSI_COLOR_CODING   DSI_RGB888
 
#define OTM8009A_FORMAT   OTM8009A_FORMAT_RGB888
 
#define EW_BSP_DISPLAY_UPDATE_NORMAL   0x00000000
 
#define EW_BSP_DISPLAY_UPDATE_PARTIAL   0x00000001
 
#define EW_BSP_DISPLAY_UPDATE_SCRATCHPAD   0x00000002
 

Functions

void LCD_MspInit (void)
 LCD Intialization. More...
 
static void LCD_DisplayOn (void)
 LCD ON. More...
 
static void LCD_DisplayOff (void)
 LCD OFF. More...
 
static int32_t DSI_IO_Write (uint16_t ChannelNbr, uint16_t Reg, uint8_t *pData, uint16_t Size)
 DCS or Generic short/long write command. More...
 
static int32_t DSI_IO_Read (uint16_t ChannelNbr, uint16_t Reg, uint8_t *pData, uint16_t Size)
 DCS or Generic read command. More...
 
void LTDC_IRQHandler (void)
 
void LTDC_ER_IRQHandler (void)
 
void DSI_IRQHandler (void)
 
void HAL_DSI_TearingEffectCallback (DSI_HandleTypeDef *hdsi)
 
void HAL_DSI_EndOfRefreshCallback (DSI_HandleTypeDef *hdsi)
 
static void WaitForDsiTransfer (void)
 
int EwBspDisplayInit (XDisplayInfo *aDisplayInfo)
 The function EwBspDisplayInit initializes the display hardware and returns the display parameter. More...
 
void EwBspDisplayDone (void)
 The function EwBspDisplayDone deinitializes the display hardware. More...
 
int EwBspDisplayGetUpdateArea (XRect *aUpdateRect)
 The function EwBspDisplayGetUpdateArea returns the next update area depending on the selected display mode: In case of a synchroneous single-buffer, the function has to return the the rectangular areas that correspond to the horizontal stripes (fields) of the framebuffer. In case of a scratch-pad buffer, the function has to return the subareas that fit into the provided update rectangle. During each display update, this function is called until it returns 0. More...
 
void EwBspDisplayWaitForCompletion (void)
 The function EwBspDisplayWaitForCompletion is called from the Graphics Engine to ensure that all pending activities of the display system are completed, so that the rendering of the next frame can start. In case of a double-buffering system, the function has to wait until the V-sync has occured and the pending buffer is used by the display controller. In case of an external display controller, the function has to wait until the transfer (update) of the graphics data has been completed and there are no pending buffers. More...
 
void EwBspDisplayCommitBuffer (void *aAddress, int aX, int aY, int aWidth, int aHeight)
 The function EwBspDisplayCommitBuffer is called from the Graphics Engine when the rendering of a certain buffer has been completed. The type of buffer depends on the selected framebuffer concept. If the display is running in a double-buffering mode, the function is called after each buffer update in order to change the currently active framebuffer address. Changing the framebuffer address should be synchronized with V-sync. If the system is using an external graphics controller, this function is responsible to start the transfer of the framebuffer content. More...
 
void EwBspDisplaySetClut (unsigned long *aClut)
 The function EwBspDisplaySetClut is called from the Graphics Engine in order to update the hardware CLUT of the current framebuffer. The function is only called when the color format of the framebuffer is Index8 or LumA44. More...
 

Variables

LTDC_HandleTypeDef hltdc_handle
 
DSI_HandleTypeDef hdsi_handle
 
static LTDC_LayerCfgTypeDef LayerConfig
 
static volatile int32_t ActiveArea = NO_AREA
 
static RCC_PeriphCLKInitTypeDef PeriphClkInitStruct
 
uint8_t pColLeft [] = {0x00, 0x00, 0x01, 0x8F}
 
uint8_t pColRight [] = {0x01, 0x90, 0x03, 0x1F}
 
uint8_t pPage [] = {0x00, 0x00, 0x01, 0xDF}
 
uint8_t pScanCol [] = {0x02, 0x15}
 
static int FirstUpdateIsDone = 0
 

Detailed Description

Macro Definition Documentation

◆ __DSI_MASK_TE

#define __DSI_MASK_TE ( )    (GPIOJ->AFR[0] &= (0xFFFFF0FFU))

Mask DSI TearingEffect Pin

◆ __DSI_UNMASK_TE

#define __DSI_UNMASK_TE ( )
Value:
(GPIOJ->AFR[0] |= \
((uint32_t)(GPIO_AF13_DSI) << 8))

UnMask DSI TearingEffect Pin

◆ DSI_COLOR_CODING

#define DSI_COLOR_CODING   DSI_RGB888

◆ EW_BSP_DISPLAY_UPDATE_NORMAL

#define EW_BSP_DISPLAY_UPDATE_NORMAL   0x00000000

◆ EW_BSP_DISPLAY_UPDATE_PARTIAL

#define EW_BSP_DISPLAY_UPDATE_PARTIAL   0x00000001

◆ EW_BSP_DISPLAY_UPDATE_SCRATCHPAD

#define EW_BSP_DISPLAY_UPDATE_SCRATCHPAD   0x00000002

◆ HBP

#define HBP   1

◆ hdsi_handle

#define hdsi_handle   hlcd_dsi

◆ HFP

#define HFP   1

◆ hltdc_handle

#define hltdc_handle   hlcd_ltdc

◆ HSYNC

#define HSYNC   1

◆ LAYER_INDEX

#define LAYER_INDEX   0

◆ LEFT_AREA

#define LEFT_AREA   1

◆ NO_AREA

#define NO_AREA   0

◆ OTM8009A_FORMAT

#define OTM8009A_FORMAT   OTM8009A_FORMAT_RGB888

◆ RIGHT_AREA

#define RIGHT_AREA   2

◆ VBP

#define VBP   1

◆ VFP

#define VFP   1

◆ VSYNC

#define VSYNC   1

Function Documentation

◆ DSI_IO_Read()

static int32_t DSI_IO_Read ( uint16_t  ChannelNbr,
uint16_t  Reg,
uint8_t *  pData,
uint16_t  Size 
)
static

DCS or Generic read command.

Parameters
ChannelNbrVirtual channel ID
RegRegister to be read
pDatapointer to a buffer to store the payload of a read back operation.
SizeData size to be read (in byte).
Return values
BSPstatus

◆ DSI_IO_Write()

static int32_t DSI_IO_Write ( uint16_t  ChannelNbr,
uint16_t  Reg,
uint8_t *  pData,
uint16_t  Size 
)
static

DCS or Generic short/long write command.

Parameters
ChannelNbrVirtual channel ID
RegRegister to be written
pDatapointer to a buffer of data to be write
SizeTo precise command to be used (short or long)
Return values
BSPstatus

References hdsi_handle.

◆ DSI_IRQHandler()

void DSI_IRQHandler ( void  )

◆ EwBspDisplayCommitBuffer()

void EwBspDisplayCommitBuffer ( void aAddress,
int  aX,
int  aY,
int  aWidth,
int  aHeight 
)

The function EwBspDisplayCommitBuffer is called from the Graphics Engine when the rendering of a certain buffer has been completed. The type of buffer depends on the selected framebuffer concept. If the display is running in a double-buffering mode, the function is called after each buffer update in order to change the currently active framebuffer address. Changing the framebuffer address should be synchronized with V-sync. If the system is using an external graphics controller, this function is responsible to start the transfer of the framebuffer content.

Parameters
aAddressAddress of the framebuffer to be shown on the display.
aXX,Origin of the area which has been updated by the Graphics Engine
aYX,Origin of the area which has been updated by the Graphics Engine
aWidthSize of the area which has been updated by the Graphics Engine
aHeightSize of the area which has been updated by the Graphics Engine

Here is the caller graph for this function:

◆ EwBspDisplayDone()

void EwBspDisplayDone ( void  )

The function EwBspDisplayDone deinitializes the display hardware.


Here is the caller graph for this function:

◆ EwBspDisplayGetUpdateArea()

int EwBspDisplayGetUpdateArea ( XRect aUpdateRect)

The function EwBspDisplayGetUpdateArea returns the next update area depending on the selected display mode: In case of a synchroneous single-buffer, the function has to return the the rectangular areas that correspond to the horizontal stripes (fields) of the framebuffer. In case of a scratch-pad buffer, the function has to return the subareas that fit into the provided update rectangle. During each display update, this function is called until it returns 0.

Parameters
aUpdateRectRectangular area which should be updated (redrawn).
Returns
int - Returns 1 if a further update area can be provided, 0 otherwise.

Here is the caller graph for this function:

◆ EwBspDisplayInit()

int EwBspDisplayInit ( XDisplayInfo aDisplayInfo)

The function EwBspDisplayInit initializes the display hardware and returns the display parameter.

Parameters
aDisplayInfoDisplay info data structure.
Returns
int - Returns 1 if successful, 0 otherwise.

Here is the caller graph for this function:

◆ EwBspDisplaySetClut()

void EwBspDisplaySetClut ( unsigned long *  aClut)

The function EwBspDisplaySetClut is called from the Graphics Engine in order to update the hardware CLUT of the current framebuffer. The function is only called when the color format of the framebuffer is Index8 or LumA44.

Parameters
aClutPointer to a color lookup table with 256 entries.

◆ EwBspDisplayWaitForCompletion()

void EwBspDisplayWaitForCompletion ( void  )

The function EwBspDisplayWaitForCompletion is called from the Graphics Engine to ensure that all pending activities of the display system are completed, so that the rendering of the next frame can start. In case of a double-buffering system, the function has to wait until the V-sync has occured and the pending buffer is used by the display controller. In case of an external display controller, the function has to wait until the transfer (update) of the graphics data has been completed and there are no pending buffers.


Here is the caller graph for this function:

◆ HAL_DSI_EndOfRefreshCallback()

void HAL_DSI_EndOfRefreshCallback ( DSI_HandleTypeDef *  hdsi)

◆ HAL_DSI_TearingEffectCallback()

void HAL_DSI_TearingEffectCallback ( DSI_HandleTypeDef *  hdsi)

◆ LCD_DisplayOff()

static void LCD_DisplayOff ( void  )
static

LCD OFF.


◆ LCD_DisplayOn()

static void LCD_DisplayOn ( void  )
static

LCD ON.


◆ LCD_MspInit()

void LCD_MspInit ( void  )

LCD Intialization.


Enable the LTDC clock

Toggle Sw reset of LTDC IP

Enable the DMA2D clock

Toggle Sw reset of DMA2D IP

Enable DSI Host and wrapper clocks

Soft Reset the DSI Host and wrapper

NVIC configuration for LTDC interrupt that is now enabled

NVIC configuration for DMA2D interrupt that is now enabled

NVIC configuration for DSI interrupt that is now enabled

◆ LTDC_ER_IRQHandler()

void LTDC_ER_IRQHandler ( void  )

◆ LTDC_IRQHandler()

void LTDC_IRQHandler ( void  )

◆ WaitForDsiTransfer()

static void WaitForDsiTransfer ( void  )
static

Variable Documentation

◆ ActiveArea

volatile int32_t ActiveArea = NO_AREA
static

◆ FirstUpdateIsDone

int FirstUpdateIsDone = 0
static

◆ hdsi_handle

DSI_HandleTypeDef hdsi_handle

◆ hltdc_handle

LTDC_HandleTypeDef hltdc_handle

◆ LayerConfig

LTDC_LayerCfgTypeDef LayerConfig
static

◆ pColLeft

uint8_t pColLeft[] = {0x00, 0x00, 0x01, 0x8F}

0 -> 399

◆ pColRight

uint8_t pColRight[] = {0x01, 0x90, 0x03, 0x1F}

400 -> 799

◆ PeriphClkInitStruct

RCC_PeriphCLKInitTypeDef PeriphClkInitStruct
static

◆ pPage

uint8_t pPage[] = {0x00, 0x00, 0x01, 0xDF}

0 -> 479

◆ pScanCol

uint8_t pScanCol[] = {0x02, 0x15}

Scan @ 533