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 |
#define __DSI_MASK_TE | ( | ) | (GPIOJ->AFR[0] &= (0xFFFFF0FFU)) |
Mask DSI TearingEffect Pin
#define __DSI_UNMASK_TE | ( | ) |
UnMask DSI TearingEffect Pin
#define DSI_COLOR_CODING DSI_RGB888 |
#define EW_BSP_DISPLAY_UPDATE_NORMAL 0x00000000 |
#define EW_BSP_DISPLAY_UPDATE_PARTIAL 0x00000001 |
#define EW_BSP_DISPLAY_UPDATE_SCRATCHPAD 0x00000002 |
#define HBP 1 |
#define hdsi_handle hlcd_dsi |
#define HFP 1 |
#define hltdc_handle hlcd_ltdc |
#define HSYNC 1 |
#define LAYER_INDEX 0 |
#define LEFT_AREA 1 |
#define NO_AREA 0 |
#define OTM8009A_FORMAT OTM8009A_FORMAT_RGB888 |
#define RIGHT_AREA 2 |
#define VBP 1 |
#define VFP 1 |
#define VSYNC 1 |
|
static |
DCS or Generic read command.
ChannelNbr | Virtual channel ID |
Reg | Register to be read |
pData | pointer to a buffer to store the payload of a read back operation. |
Size | Data size to be read (in byte). |
BSP | status |
|
static |
DCS or Generic short/long write command.
ChannelNbr | Virtual channel ID |
Reg | Register to be written |
pData | pointer to a buffer of data to be write |
Size | To precise command to be used (short or long) |
BSP | status |
References hdsi_handle.
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.
aAddress | Address of the framebuffer to be shown on the display. |
aX | X,Origin of the area which has been updated by the Graphics Engine |
aY | X,Origin of the area which has been updated by the Graphics Engine |
aWidth | Size of the area which has been updated by the Graphics Engine |
aHeight | Size of the area which has been updated by the Graphics Engine |
The function EwBspDisplayDone deinitializes the display hardware.
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.
aUpdateRect | Rectangular area which should be updated (redrawn). |
int EwBspDisplayInit | ( | XDisplayInfo * | aDisplayInfo | ) |
The function EwBspDisplayInit initializes the display hardware and returns the display parameter.
aDisplayInfo | Display info data structure. |
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.
aClut | Pointer to a color lookup table with 256 entries. |
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.
void HAL_DSI_EndOfRefreshCallback | ( | DSI_HandleTypeDef * | hdsi | ) |
void HAL_DSI_TearingEffectCallback | ( | DSI_HandleTypeDef * | hdsi | ) |
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
|
static |
|
static |
DSI_HandleTypeDef hdsi_handle |
LTDC_HandleTypeDef hltdc_handle |
|
static |
uint8_t pColLeft[] = {0x00, 0x00, 0x01, 0x8F} |
0 -> 399
uint8_t pColRight[] = {0x01, 0x90, 0x03, 0x1F} |
400 -> 799
|
static |
uint8_t pPage[] = {0x00, 0x00, 0x01, 0xDF} |
0 -> 479
uint8_t pScanCol[] = {0x02, 0x15} |
Scan @ 533