RA Flexible Software Package Documentation  Release v5.6.0

 
Display Interface

Detailed Description

Interface for LCD panel displays.

Summary

The display interface provides standard display functionality:

Data Structures

struct  display_timing_t
 
struct  display_color_t
 
struct  display_coordinate_t
 
struct  display_brightness_t
 
struct  display_contrast_t
 
struct  display_correction_t
 
struct  gamma_correction_t
 
struct  display_gamma_correction_t
 
struct  display_clut_t
 
struct  display_colorkeying_cfg_t
 
struct  display_colorkeying_layer_t
 
struct  display_input_cfg_t
 
struct  display_output_cfg_t
 
struct  display_layer_t
 
struct  display_callback_args_t
 
struct  display_cfg_t
 
struct  display_runtime_cfg_t
 
struct  display_clut_cfg_t
 
struct  display_status_t
 
struct  display_api_t
 
struct  display_instance_t
 

Typedefs

typedef void display_ctrl_t
 

Enumerations

enum  display_frame_layer_t
 
enum  display_state_t
 
enum  display_event_t
 
enum  display_in_format_t
 
enum  display_out_format_t
 
enum  display_endian_t
 
enum  display_color_order_t
 
enum  display_signal_polarity_t
 
enum  display_sync_edge_t
 
enum  display_fade_control_t
 
enum  display_fade_status_t
 
enum  display_color_keying_t
 
enum  display_data_swap_t
 

Data Structure Documentation

◆ display_timing_t

struct display_timing_t

Display signal timing setting

Data Fields
uint16_t total_cyc Total cycles in one line or total lines in one frame.
uint16_t display_cyc Active video cycles or lines.
uint16_t back_porch Back porch cycles or lines.
uint16_t sync_width Sync signal asserting width.
display_signal_polarity_t sync_polarity Sync signal polarity.

◆ display_color_t

struct display_color_t

RGB Color setting

◆ display_coordinate_t

struct display_coordinate_t

Contrast (gain) correction setting

Data Fields
int16_t x Coordinate X, this allows to set signed value.
int16_t y Coordinate Y, this allows to set signed value.

◆ display_brightness_t

struct display_brightness_t

Brightness (DC) correction setting

Data Fields
bool enable Brightness Correction On/Off.
uint16_t r Brightness (DC) adjustment for R channel.
uint16_t g Brightness (DC) adjustment for G channel.
uint16_t b Brightness (DC) adjustment for B channel.

◆ display_contrast_t

struct display_contrast_t

Contrast (gain) correction setting

Data Fields
bool enable Contrast Correction On/Off.
uint8_t r Contrast (gain) adjustment for R channel.
uint8_t g Contrast (gain) adjustment for G channel.
uint8_t b Contrast (gain) adjustment for B channel.

◆ display_correction_t

struct display_correction_t

Color correction setting

Data Fields
display_brightness_t brightness Brightness.
display_contrast_t contrast Contrast.

◆ gamma_correction_t

struct gamma_correction_t

Gamma correction setting for each color

Data Fields
bool enable Gamma Correction On/Off.
uint16_t * gain Gain adjustment.
uint16_t * threshold Start threshold.

◆ display_gamma_correction_t

struct display_gamma_correction_t

Gamma correction setting

Data Fields
gamma_correction_t r Gamma correction for R channel.
gamma_correction_t g Gamma correction for G channel.
gamma_correction_t b Gamma correction for B channel.

◆ display_clut_t

struct display_clut_t

CLUT setting

Data Fields
uint32_t color_num The number of colors in CLUT.
const uint32_t * p_clut Address of the area storing the CLUT data (in ARGB8888 format)

◆ display_colorkeying_cfg_t

struct display_colorkeying_cfg_t

Color Keying setting

Data Fields
display_color_t src_color Source color.
display_color_t dst_color Destination color.
display_color_keying_t enable_ckey Select enable or disable.

◆ display_colorkeying_layer_t

struct display_colorkeying_layer_t

Color Keying layer setting

◆ display_input_cfg_t

struct display_input_cfg_t

Graphics plane input configuration structure

Data Fields
uint32_t * p_base Base address to the frame buffer.
uint16_t hsize Horizontal pixel size in a line.
uint16_t vsize Vertical pixel size in a frame.
uint32_t hstride Memory stride (bytes) in a line.
display_in_format_t format Input format setting.
bool line_descending_enable Line descending enable.
bool lines_repeat_enable Line repeat enable.
uint16_t lines_repeat_times Expected number of line repeating.

◆ display_output_cfg_t

struct display_output_cfg_t

Display output configuration structure

Data Fields
display_timing_t htiming Horizontal display cycle setting.
display_timing_t vtiming Vertical display cycle setting.
display_out_format_t format Output format setting.
display_endian_t endian Bit order of output data.
display_color_order_t color_order Color order in pixel.
display_signal_polarity_t data_enable_polarity Data Enable signal polarity.
display_sync_edge_t sync_edge Signal sync edge selection.
display_color_t bg_color Background color.
display_brightness_t brightness Brightness setting.
display_contrast_t contrast Contrast setting.
display_gamma_correction_t * p_gamma_correction Pointer to gamma correction setting.
bool dithering_on Dithering on/off.

◆ display_layer_t

struct display_layer_t

Graphics layer blend setup parameter structure

Data Fields
display_coordinate_t coordinate Blending location (starting point of image)
display_color_t bg_color Color outside region.
display_fade_control_t fade_control Layer fade-in/out control on/off.
uint8_t fade_speed Layer fade-in/out frame rate.

◆ display_callback_args_t

struct display_callback_args_t

Display callback parameter definition

Data Fields
display_event_t event Event code.
void const * p_context Context provided to user during callback.

◆ display_cfg_t

struct display_cfg_t

Display main configuration structure

Data Fields

display_input_cfg_t input [2]
 Graphics input frame setting. More...
 
display_output_cfg_t output
 Graphics output frame setting.
 
display_layer_t layer [2]
 Graphics layer blend setting.
 
uint8_t line_detect_ipl
 Line detect interrupt priority.
 
uint8_t underflow_1_ipl
 Underflow 1 interrupt priority.
 
uint8_t underflow_2_ipl
 Underflow 2 interrupt priority.
 
IRQn_Type line_detect_irq
 Line detect interrupt vector.
 
IRQn_Type underflow_1_irq
 Underflow 1 interrupt vector.
 
IRQn_Type underflow_2_irq
 Underflow 2 interrupt vector.
 
void(* p_callback )(display_callback_args_t *p_args)
 Pointer to callback function. More...
 
void const * p_context
 User defined context passed into callback function.
 
void const * p_extend
 Display hardware dependent configuration. More...
 

Field Documentation

◆ input

display_input_cfg_t display_cfg_t::input[2]

Graphics input frame setting.

Generic configuration for display devices

◆ p_callback

void(* display_cfg_t::p_callback) (display_callback_args_t *p_args)

Pointer to callback function.

Configuration for display event processing

◆ p_extend

void const* display_cfg_t::p_extend

Display hardware dependent configuration.

Pointer to display peripheral specific configuration

◆ display_runtime_cfg_t

struct display_runtime_cfg_t

Display main configuration structure

Data Fields
display_input_cfg_t input Graphics input frame setting.

Generic configuration for display devices

display_layer_t layer Graphics layer alpha blending setting.

◆ display_clut_cfg_t

struct display_clut_cfg_t

Display CLUT configuration structure

Data Fields
uint32_t * p_base Pointer to CLUT source data.
uint16_t start Beginning of CLUT entry to be updated.
uint16_t size Size of CLUT entry to be updated.

◆ display_status_t

struct display_status_t

Display Status

Data Fields
display_state_t state Status of display module.
display_fade_status_t fade_status[DISPLAY_FRAME_LAYER_2+1] Status of fade-in/fade-out status.

◆ display_api_t

struct display_api_t

Shared Interface definition for display peripheral

Data Fields

fsp_err_t(* open )(display_ctrl_t *const p_ctrl, display_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(display_ctrl_t *const p_ctrl)
 
fsp_err_t(* start )(display_ctrl_t *const p_ctrl)
 
fsp_err_t(* stop )(display_ctrl_t *const p_ctrl)
 
fsp_err_t(* layerChange )(display_ctrl_t const *const p_ctrl, display_runtime_cfg_t const *const p_cfg, display_frame_layer_t frame)
 
fsp_err_t(* bufferChange )(display_ctrl_t const *const p_ctrl, uint8_t *const framebuffer, display_frame_layer_t frame)
 
fsp_err_t(* correction )(display_ctrl_t const *const p_ctrl, display_correction_t const *const p_param)
 
fsp_err_t(* clut )(display_ctrl_t const *const p_ctrl, display_clut_cfg_t const *const p_clut_cfg, display_frame_layer_t layer)
 
fsp_err_t(* clutEdit )(display_ctrl_t const *const p_ctrl, display_frame_layer_t layer, uint8_t index, uint32_t color)
 
fsp_err_t(* colorKeySet )(display_ctrl_t const *const p_ctrl, display_colorkeying_layer_t key_cfg, display_frame_layer_t layer)
 
fsp_err_t(* statusGet )(display_ctrl_t const *const p_ctrl, display_status_t *const p_status)
 

Field Documentation

◆ open

fsp_err_t(* display_api_t::open) (display_ctrl_t *const p_ctrl, display_cfg_t const *const p_cfg)

Open display device.

Parameters
[in,out]p_ctrlPointer to display interface control block. Must be declared by user. Value set here.
[in]p_cfgPointer to display configuration structure. All elements of this structure must be set by user.

◆ close

fsp_err_t(* display_api_t::close) (display_ctrl_t *const p_ctrl)

Close display device.

Parameters
[in]p_ctrlPointer to display interface control block.

◆ start

fsp_err_t(* display_api_t::start) (display_ctrl_t *const p_ctrl)

Display start.

Parameters
[in]p_ctrlPointer to display interface control block.

◆ stop

fsp_err_t(* display_api_t::stop) (display_ctrl_t *const p_ctrl)

Display stop.

Parameters
[in]p_ctrlPointer to display interface control block.

◆ layerChange

fsp_err_t(* display_api_t::layerChange) (display_ctrl_t const *const p_ctrl, display_runtime_cfg_t const *const p_cfg, display_frame_layer_t frame)

Change layer parameters at runtime.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]p_cfgPointer to run-time layer configuration structure.
[in]frameNumber of graphic frames.

◆ bufferChange

fsp_err_t(* display_api_t::bufferChange) (display_ctrl_t const *const p_ctrl, uint8_t *const framebuffer, display_frame_layer_t frame)

Change layer framebuffer pointer.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]framebufferPointer to desired framebuffer.
[in]frameNumber of graphic frames.

◆ correction

fsp_err_t(* display_api_t::correction) (display_ctrl_t const *const p_ctrl, display_correction_t const *const p_param)

Color correction.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]paramPointer to color correction configuration structure.

◆ clut

fsp_err_t(* display_api_t::clut) (display_ctrl_t const *const p_ctrl, display_clut_cfg_t const *const p_clut_cfg, display_frame_layer_t layer)

Set CLUT for display device.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]p_clut_cfgPointer to CLUT configuration structure.
[in]layerLayer number corresponding to the CLUT.

◆ clutEdit

fsp_err_t(* display_api_t::clutEdit) (display_ctrl_t const *const p_ctrl, display_frame_layer_t layer, uint8_t index, uint32_t color)

Set CLUT element for display device.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]layerLayer number corresponding to the CLUT.
[in]indexCLUT element index.
[in]colorDesired CLUT index color.

◆ colorKeySet

fsp_err_t(* display_api_t::colorKeySet) (display_ctrl_t const *const p_ctrl, display_colorkeying_layer_t key_cfg, display_frame_layer_t layer)

Configure color keying.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]key_cfgPointer to color keying configuration.
[in]layerLayer to apply color keying.

◆ statusGet

fsp_err_t(* display_api_t::statusGet) (display_ctrl_t const *const p_ctrl, display_status_t *const p_status)

Get status for display device.

Parameters
[in]p_ctrlPointer to display interface control block.
[in]statusPointer to display interface status structure.

◆ display_instance_t

struct display_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
display_ctrl_t * p_ctrl Pointer to the control structure for this instance.
display_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
display_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ display_ctrl_t

typedef void display_ctrl_t

Display control block. Allocate an instance specific control block to pass into the display API calls.Display control block

Enumeration Type Documentation

◆ display_frame_layer_t

Display frame number

Enumerator
DISPLAY_FRAME_LAYER_1 

Frame layer 1.

DISPLAY_FRAME_LAYER_2 

Frame layer 2.

◆ display_state_t

Display interface operation state

Enumerator
DISPLAY_STATE_CLOSED 

Display closed.

DISPLAY_STATE_OPENED 

Display opened.

DISPLAY_STATE_DISPLAYING 

Displaying.

◆ display_event_t

Display event codes

Enumerator
DISPLAY_EVENT_GR1_UNDERFLOW 

Graphics frame1 underflow occurs.

DISPLAY_EVENT_GR2_UNDERFLOW 

Graphics frame2 underflow occurs.

DISPLAY_EVENT_LINE_DETECTION 

Designated line is processed.

DISPLAY_EVENT_FRAME_END 

Frame end is processed.

◆ display_in_format_t

Input format setting

Enumerator
DISPLAY_IN_FORMAT_32BITS_ARGB8888 

ARGB8888, 32 bits.

DISPLAY_IN_FORMAT_32BITS_RGB888 

RGB888, 32 bits.

DISPLAY_IN_FORMAT_16BITS_RGB565 

RGB565, 16 bits.

DISPLAY_IN_FORMAT_16BITS_ARGB1555 

ARGB1555, 16 bits.

DISPLAY_IN_FORMAT_16BITS_ARGB4444 

ARGB4444, 16 bits.

DISPLAY_IN_FORMAT_CLUT8 

CLUT8.

DISPLAY_IN_FORMAT_CLUT4 

CLUT4.

DISPLAY_IN_FORMAT_CLUT1 

CLUT1.

◆ display_out_format_t

Output format setting

Enumerator
DISPLAY_OUT_FORMAT_24BITS_RGB888 

RGB888, 24 bits.

DISPLAY_OUT_FORMAT_18BITS_RGB666 

RGB666, 18 bits.

DISPLAY_OUT_FORMAT_16BITS_RGB565 

RGB565, 16 bits.

DISPLAY_OUT_FORMAT_8BITS_SERIAL 

SERIAL, 8 bits.

◆ display_endian_t

Data endian select

Enumerator
DISPLAY_ENDIAN_LITTLE 

Little-endian.

DISPLAY_ENDIAN_BIG 

Big-endian.

◆ display_color_order_t

RGB color order select

Enumerator
DISPLAY_COLOR_ORDER_RGB 

Color order RGB.

DISPLAY_COLOR_ORDER_BGR 

Color order BGR.

◆ display_signal_polarity_t

Polarity of a signal select

Enumerator
DISPLAY_SIGNAL_POLARITY_LOACTIVE 

Low active signal.

DISPLAY_SIGNAL_POLARITY_HIACTIVE 

High active signal.

◆ display_sync_edge_t

Signal synchronization edge select

Enumerator
DISPLAY_SIGNAL_SYNC_EDGE_RISING 

Signal is synchronized to rising edge.

DISPLAY_SIGNAL_SYNC_EDGE_FALLING 

Signal is synchronized to falling edge.

◆ display_fade_control_t

Fading control

Enumerator
DISPLAY_FADE_CONTROL_NONE 

Applying no fading control.

DISPLAY_FADE_CONTROL_FADEIN 

Applying fade-in control.

DISPLAY_FADE_CONTROL_FADEOUT 

Applying fade-out control.

◆ display_fade_status_t

Fading status

Enumerator
DISPLAY_FADE_STATUS_NOT_UNDERWAY 

Fade-in/fade-out is not in progress.

DISPLAY_FADE_STATUS_FADING_UNDERWAY 

Fade-in or fade-out is in progress.

DISPLAY_FADE_STATUS_PENDING 

Fade-in/fade-out is configured but not yet started.

◆ display_color_keying_t

Color Keying enable or disable

Enumerator
DISPLAY_COLOR_KEYING_DISABLE 

Color keying disable.

DISPLAY_COLOR_KEYING_ENABLE 

Color keying enable.

◆ display_data_swap_t

Data swap settings