Synergy Software Package User's Manual

Driver for the Graphics LCD Controller (GLCDC). More...

Data Structures

struct  glcd_instance_ctrl_t
 
struct  glcd_cfg_t
 
struct  glcd_ctrl_t
 

Enumerations

enum  glcd_clk_src_t { GLCD_CLK_SRC_INTERNAL, GLCD_CLK_SRC_EXTERNAL }
 
enum  glcd_panel_clk_div_t {
  GLCD_PANEL_CLK_DIVISOR_1 = 1, GLCD_PANEL_CLK_DIVISOR_2 = 2, GLCD_PANEL_CLK_DIVISOR_3 = 3, GLCD_PANEL_CLK_DIVISOR_4 = 4,
  GLCD_PANEL_CLK_DIVISOR_5 = 5, GLCD_PANEL_CLK_DIVISOR_6 = 6, GLCD_PANEL_CLK_DIVISOR_7 = 7, GLCD_PANEL_CLK_DIVISOR_8 = 8,
  GLCD_PANEL_CLK_DIVISOR_9 = 9, GLCD_PANEL_CLK_DIVISOR_12 = 12, GLCD_PANEL_CLK_DIVISOR_16 = 16, GLCD_PANEL_CLK_DIVISOR_24 = 24,
  GLCD_PANEL_CLK_DIVISOR_32 = 32
}
 
enum  glcd_tcon_pin_t {
  GLCD_TCON_PIN_NONE = -1, GLCD_TCON_PIN_0, GLCD_TCON_PIN_1, GLCD_TCON_PIN_2,
  GLCD_TCON_PIN_3
}
 
enum  glcd_bus_arbitration_t { GLCD_BUS_ARBITRATION_ROUNDROBIN, GLCD_BUS_ARBITRATION_FIX_PRIORITY }
 
enum  glcd_correction_proc_order_t { GLCD_CORRECTION_PROC_ORDER_BRIGHTNESS_CONTRAST2GAMMA, GLCD_CORRECTION_PROC_ORDER_GAMMA2BRIGHTNESS_CONTRAST }
 
enum  glcd_tcon_signal_select_t {
  GLCD_TCON_SIGNAL_SELECT_STVA_VS = 0, GLCD_TCON_SIGNAL_SELECT_STVB_VE = 1, GLCD_TCON_SIGNAL_SELECT_STHA_HS = 2, GLCD_TCON_SIGNAL_SELECT_STHB_HE = 3,
  GLCD_TCON_SIGNAL_SELECT_DE = 7
}
 
enum  glcd_clut_plane_t { GLCD_CLUT_PLANE_0 = 0, GLCD_CLUT_PLANE_1 = 1 }
 
enum  glcd_dithering_mode_t { GLCD_DITHERING_MODE_TRUNCATE = 0, GLCD_DITHERING_MODE_ROUND_OFF = 1, GLCD_DITHERING_MODE_2X2PATTERN = 2, GLCD_DITHERING_MODE_SETTING_MAX }
 
enum  glcd_dithering_pattern_t { GLCD_DITHERING_PATTERN_00 = 0, GLCD_DITHERING_PATTERN_01 = 1, GLCD_DITHERING_PATTERN_10 = 2, GLCD_DITHERING_PATTERN_11 = 3 }
 
enum  glcd_input_interface_format_t {
  GLCD_INPUT_INTERFACE_FORMAT_RGB565 = 0, GLCD_INPUT_INTERFACE_FORMAT_RGB888 = 1, GLCD_INPUT_INTERFACE_FORMAT_ARGB1555 = 2, GLCD_INPUT_INTERFACE_FORMAT_ARGB4444 = 3,
  GLCD_INPUT_INTERFACE_FORMAT_ARGB8888 = 4, GLCD_INPUT_INTERFACE_FORMAT_CLUT8 = 5, GLCD_INPUT_INTERFACE_FORMAT_CLUT4 = 6, GLCD_INPUT_INTERFACE_FORMAT_CLUT1 = 7
}
 
enum  glcd_output_interface_format_t { GLCD_OUTPUT_INTERFACE_FORMAT_RGB888 = 0, GLCD_OUTPUT_INTERFACE_FORMAT_RGB666 = 1, GLCD_OUTPUT_INTERFACE_FORMAT_RGB565 = 2, GLCD_OUTPUT_INTERFACE_FORMAT_SERIAL_RGB = 3 }
 
enum  glcd_dithering_output_format_t { GLCD_DITHERING_OUTPUT_FORMAT_RGB888 = 0, GLCD_DITHERING_OUTPUT_FORMAT_RGB666 = 1, GLCD_DITHERING_OUTPUT_FORMAT_RGB565 = 2 }
 

Functions

ssp_err_t R_GLCD_Open (display_ctrl_t *const p_api_ctrl, display_cfg_t const *const p_cfg)
 Open GLCDC module. More...
 
ssp_err_t R_GLCD_Close (display_ctrl_t *const p_api_ctrl)
 Close GLCDC module. More...
 
ssp_err_t R_GLCD_Start (display_ctrl_t *const p_api_ctrl)
 Start GLCDC module. More...
 
ssp_err_t R_GLCD_Stop (display_ctrl_t *const p_api_ctrl)
 Stop GLCDC module. More...
 
ssp_err_t R_GLCD_LayerChange (display_ctrl_t const *const p_api_ctrl, display_runtime_cfg_t const *const p_cfg, display_frame_layer_t frame)
 Change layer parameters of GLCDC module at runtime. More...
 
ssp_err_t R_GLCD_ColorCorrection (display_ctrl_t const *const p_api_ctrl, display_correction_t const *const p_correction)
 Perform color correction by GLCDC module. More...
 
ssp_err_t R_GLCD_ClutUpdate (display_ctrl_t const *const p_api_ctrl, display_clut_cfg_t const *const p_clut_cfg, display_frame_layer_t frame)
 Update Color Look Up Table of GLCDC module. More...
 
ssp_err_t R_GLCD_StatusGet (display_ctrl_t const *const p_api_ctrl, display_status_t *const p_status)
 Get status of GLCDC module. More...
 
ssp_err_t R_GLCD_VersionGet (ssp_version_t *p_version)
 Get version of R_GLCDC module. More...
 

Detailed Description

Driver for the Graphics LCD Controller (GLCDC).

Summary

Implements Display Interface. This module supports the Graphics LCD Controller (GLCDC). It implements the display interface and drives LCD panels connected to the GLCDC pins.

Enumeration Type Documentation

◆ glcd_bus_arbitration_t

Bus Arbitration setting

Enumerator
GLCD_BUS_ARBITRATION_ROUNDROBIN 

Round robin.

GLCD_BUS_ARBITRATION_FIX_PRIORITY 

Fixed.

◆ glcd_clk_src_t

Clock source select

Enumerator
GLCD_CLK_SRC_INTERNAL 

Internal.

GLCD_CLK_SRC_EXTERNAL 

External.

◆ glcd_clut_plane_t

Clock phase adjustment for serial RGB output

Enumerator
GLCD_CLUT_PLANE_0 

GLCD CLUT plane 0.

GLCD_CLUT_PLANE_1 

GLCD CLUT plane 1.

◆ glcd_correction_proc_order_t

Correction circuit sequence control

Enumerator
GLCD_CORRECTION_PROC_ORDER_BRIGHTNESS_CONTRAST2GAMMA 

Brightness -> contrast -> gamma correction.

GLCD_CORRECTION_PROC_ORDER_GAMMA2BRIGHTNESS_CONTRAST 

Gamma correction -> brightness -> contrast.

◆ glcd_dithering_mode_t

Dithering mode

Enumerator
GLCD_DITHERING_MODE_TRUNCATE 

No dithering (truncate)

GLCD_DITHERING_MODE_ROUND_OFF 

Dithering with round off.

GLCD_DITHERING_MODE_2X2PATTERN 

Dithering with 2x2 pattern.

GLCD_DITHERING_MODE_SETTING_MAX 

Setting prohibited.

◆ glcd_dithering_output_format_t

Dithering output format

Enumerator
GLCD_DITHERING_OUTPUT_FORMAT_RGB888 

Dithering output format RGB888.

GLCD_DITHERING_OUTPUT_FORMAT_RGB666 

Dithering output format RGB666.

GLCD_DITHERING_OUTPUT_FORMAT_RGB565 

Dithering output format RGB565.

◆ glcd_dithering_pattern_t

Dithering mode

Enumerator
GLCD_DITHERING_PATTERN_00 

2x2 pattern '00'

GLCD_DITHERING_PATTERN_01 

2x2 pattern '01'

GLCD_DITHERING_PATTERN_10 

2x2 pattern '10'

GLCD_DITHERING_PATTERN_11 

2x2 pattern '11'

◆ glcd_input_interface_format_t

Output interface format

Enumerator
GLCD_INPUT_INTERFACE_FORMAT_RGB565 

Input interface format RGB565.

GLCD_INPUT_INTERFACE_FORMAT_RGB888 

Input interface format RGB888.

GLCD_INPUT_INTERFACE_FORMAT_ARGB1555 

Input interface format ARGB1555.

GLCD_INPUT_INTERFACE_FORMAT_ARGB4444 

Input interface format ARGB4444.

GLCD_INPUT_INTERFACE_FORMAT_ARGB8888 

Input interface format ARGB8888.

GLCD_INPUT_INTERFACE_FORMAT_CLUT8 

Input interface format CLUT8.

GLCD_INPUT_INTERFACE_FORMAT_CLUT4 

Input interface format CLUT4.

GLCD_INPUT_INTERFACE_FORMAT_CLUT1 

Input interface format CLUT1.

◆ glcd_output_interface_format_t

Output interface format

Enumerator
GLCD_OUTPUT_INTERFACE_FORMAT_RGB888 

Output interface format RGB888.

GLCD_OUTPUT_INTERFACE_FORMAT_RGB666 

Output interface format RGB666.

GLCD_OUTPUT_INTERFACE_FORMAT_RGB565 

Output interface format RGB565.

GLCD_OUTPUT_INTERFACE_FORMAT_SERIAL_RGB 

Output interface format Serial RGB.

◆ glcd_panel_clk_div_t

Clock frequency division ratio

Enumerator
GLCD_PANEL_CLK_DIVISOR_1 

Division Ratio 1/1.

GLCD_PANEL_CLK_DIVISOR_2 

Division Ratio 1/2.

GLCD_PANEL_CLK_DIVISOR_3 

Division Ratio 1/3.

GLCD_PANEL_CLK_DIVISOR_4 

Division Ratio 1/4.

GLCD_PANEL_CLK_DIVISOR_5 

Division Ratio 1/5.

GLCD_PANEL_CLK_DIVISOR_6 

Division Ratio 1/6.

GLCD_PANEL_CLK_DIVISOR_7 

Division Ratio 1/7.

GLCD_PANEL_CLK_DIVISOR_8 

Division Ratio 1/8.

GLCD_PANEL_CLK_DIVISOR_9 

Division Ratio 1/9.

GLCD_PANEL_CLK_DIVISOR_12 

Division Ratio 1/12.

GLCD_PANEL_CLK_DIVISOR_16 

Division Ratio 1/16.

GLCD_PANEL_CLK_DIVISOR_24 

Division Ratio 1/24.

GLCD_PANEL_CLK_DIVISOR_32 

Division Ratio 1/32.

◆ glcd_tcon_pin_t

LCD TCON output pin select

Enumerator
GLCD_TCON_PIN_NONE 

No output.

GLCD_TCON_PIN_0 

LCD_TCON0.

GLCD_TCON_PIN_1 

LCD_TCON1.

GLCD_TCON_PIN_2 

LCD_TCON2.

GLCD_TCON_PIN_3 

LCD_TCON3.

◆ glcd_tcon_signal_select_t

Timing signals for driving the LCD panel

Enumerator
GLCD_TCON_SIGNAL_SELECT_STVA_VS 

STVA/VS.

GLCD_TCON_SIGNAL_SELECT_STVB_VE 

STVB/VE.

GLCD_TCON_SIGNAL_SELECT_STHA_HS 

STH/SP/HS.

GLCD_TCON_SIGNAL_SELECT_STHB_HE 

STB/LP/HE.

GLCD_TCON_SIGNAL_SELECT_DE 

DE.

Function Documentation

◆ R_GLCD_Close()

ssp_err_t R_GLCD_Close ( display_ctrl_t *const  p_api_ctrl)

Close GLCDC module.

Implements
Return values
SSP_SUCCESSDevice was closed successfully.
SSP_ERR_ASSERTIONPointer to the control block is NULL.
SSP_ERR_NOT_OPENThe function call is performed when the driver state is not equal to DISPLAY_STATE_CLOSED.
SSP_ERR_INVALID_UPDATE_TIMINGA function call is performed when the GLCD is updating register values internally.
Note
This API can be called when the driver is not in DISPLAY_STATE_CLOSED state. It returns an error if the register update operation for the background screen generation block is being held.

Disable the GLCD interrupts

Reset the GLCD hardware

Halt the peripheral clock to the GLCD module

Unlock the GLCD resource

◆ R_GLCD_ClutUpdate()

ssp_err_t R_GLCD_ClutUpdate ( display_ctrl_t const *const  p_api_ctrl,
display_clut_cfg_t const *const  p_clut_cfg,
display_frame_layer_t  frame 
)

Update Color Look Up Table of GLCDC module.

Implements
Return values
SSP_SUCCESSCLUT updated successfully.
SSP_ERR_ASSERTIONPointer to the control block or CLUT source data is NULL.
SSP_ERR_INVALID_CLUT_ACCESSIllegal CLUT entry or size is specified.
Note
This API can be called any time.

Check the CLUT table current used

Copy the new CLUT data on the source memory to the CLUT SRAM in the GLCD module

Make the GLCD module read the new CLUT table data from the next frame

◆ R_GLCD_ColorCorrection()

ssp_err_t R_GLCD_ColorCorrection ( display_ctrl_t const *const  p_api_ctrl,
display_correction_t const *const  p_correction 
)

Perform color correction by GLCDC module.

Implements
Return values
SSP_SUCCESSColor correction by GLCDC module was performed successfully.
SSP_ERR_ASSERTIONPointer to the control block or the display correction structure is NULL.
SSP_ERR_INVALID_MODEFunction call is performed when the driver state is not DISPLAY_STATE_DISPLAYING.
SSP_ERR_INVALID_UPDATE_TIMINGA function call is performed while the GLCDC is updating registers internally.
Note
This API can be called when the driver is in the DISPLAY_STATE_DISPLAYING state. It returns an error if the register update operation for the background screen generation blocks or the output control block is being held.

Configure the brightness and contrast correction register setting.

Update the Output block register setting.

◆ R_GLCD_LayerChange()

ssp_err_t R_GLCD_LayerChange ( display_ctrl_t const *const  p_api_ctrl,
display_runtime_cfg_t const *const  p_cfg,
display_frame_layer_t  frame 
)

Change layer parameters of GLCDC module at runtime.

Implements
Return values
SSP_SUCCESSChanged layer parameters of GLCDC module successfully.
SSP_ERR_ASSERTIONPointer to the control block or the configuration structure is NULL.
SSP_ERR_INVALID_MODEA function call is performed when the driver state is not DISPLAY_STATE_DISPLAYING.
SSP_ERR_INVALID_ARGUMENTAn invalid parameter is found in the argument.
SSP_ERR_INVALID_UPDATE_TIMINGA function call is performed while the GLCD is updating register values internally.
Note
This API can be called when the driver is in DISPLAY_STATE_DISPLAYING state. It returns an error if the register update operation for the background screen generation blocks or the graphics data I/F block is being held.

Configure the graphics plane layers

Reflect the graphics module register value to the GLCD internal operations (at the timing of the next Vsync assertion)

◆ R_GLCD_Open()

ssp_err_t R_GLCD_Open ( display_ctrl_t *const  p_api_ctrl,
display_cfg_t const *const  p_cfg 
)

Open GLCDC module.

Implements
Return values
SSP_SUCCESSDevice was opened successfully.
SSP_ERR_ASSERTIONPointer to the control block or the configuration structure is NULL.
SSP_ERR_INVALID_ARGUMENTInvalid parameter in the argument.
SSP_ERR_HW_LOCKEDGLCDC resource is locked.
SSP_ERR_CLOCK_GENERATIONDot clock cannot be generated from clock source.
SSP_ERR_INVALID_TIMING_SETTINGInvalid panel timing parameter.
SSP_ERR_INVALID_LAYER_SETTINGInvalid layer setting found.
SSP_ERR_INVALID_LAYER_FORMATInvalid format is specified.
SSP_ERR_INVALID_GAMMA_SETTINGInvalid gamma correction setting found.
Note
PCLKA must be supplied to Graphics LCD Controller (GLCDC) and GLCDC pins must be set in IOPORT before calling this API.

Lock the GLCD resource

Supply the peripheral clock to the GLCD module

Release GLCD from a SW reset status.

Set the dot clock frequency

Set the panel signal timing

Configure the background screen

Store back poach position to the control block (needed to define the layer blending position later)

Configure the graphics plane layers

Configure the output control block

Configure the color correction setting (brightness, brightness and gamma correction)

Change GLCD driver state

Save callback function

Save user defined context

Save the display interface context into GLCD HAL control block

Set the line number which is suppose to happen the line detect interrupt

◆ R_GLCD_Start()

ssp_err_t R_GLCD_Start ( display_ctrl_t *const  p_api_ctrl)

Start GLCDC module.

Implements
Return values
SSP_SUCCESSDevice was started successfully.
SSP_ERR_ASSERTIONPointer to the control block is NULL.
SSP_ERR_INVALID_MODEFunction call is performed when the driver state is not DISPLAY_STATE_OPENED.
Note
This API can be called when the driver is not in DISPLAY_STATE_OPENED status.

Start to output the vertical and horizontal synchronization signals and screen data.

Enable Line detect function

◆ R_GLCD_StatusGet()

ssp_err_t R_GLCD_StatusGet ( display_ctrl_t const *const  p_api_ctrl,
display_status_t *const  p_status 
)

Get status of GLCDC module.

Implements
Return values
SSP_SUCCESSGot status successfully.
SSP_ERR_ASSERTIONPointer to the control block or the status structure is NULL.
Note
The GLCD hardware starts the fading processing at the first Vsync after the previous LayerChange() call is held. Due to this behavior of the hardware, this API may not return DISPLAY_FADE_STATUS_FADING_UNDERWAY as the fading status, if it is called before the first Vsync after LayerChange() is called. In this case, the API returns DISPLAY_FADE_STATUS_UNCERTAIN, instead of DISPLAY_FADE_STATUS_NOT_UNDERWAY.

Return the GLCD HAL driver state

Return the fading status for the layers

◆ R_GLCD_Stop()

ssp_err_t R_GLCD_Stop ( display_ctrl_t *const  p_api_ctrl)

Stop GLCDC module.

Implements
Return values
SSP_SUCCESSDevice was stopped successfully
SSP_ERR_ASSERTIONPointer to the control block is NULL
SSP_ERR_INVALID_MODEFunction call is performed when the driver state is not DISPLAY_STATE_DISPLAYING.
SSP_ERR_INVALID_UPDATE_TIMINGThe function call is performed while the GLCD is updating register values internally.
Note
This API can be called when the driver is in the DISPLAY_STATE_DISPLAYING state. It returns an error if the register update operation for the background screen generation blocks, the graphics data I/F blocks, or the output control block is being held.

Stop outputting the vertical and horizontal synchronization signals and screen data.

◆ R_GLCD_VersionGet()

ssp_err_t R_GLCD_VersionGet ( ssp_version_t p_version)

Get version of R_GLCDC module.

Implements
Parameters
p_versionThe version number
Return values
SSP_SUCCESSVersion information available in p_version.
SSP_ERR_ASSERTIONNULL pointer is passed to function.
Note
This function is re-entrant.