HAL LTDC Functions ¶
Initialization and de-initialization functions ¶
- group LTDC_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the LTDC peripheral:
-
HAL_LTDC_Init() to initialize the selected HAL LTDC handle and associate an LTDC peripheral instance
-
HAL_LTDC_DeInit() to de-initialize the given HAL LTDC instance by disabling the LTDC and LTDC layers, and resetting the state machine
Functions
-
hal_status_t
HAL_LTDC_Init
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_t
instance
)
¶
-
Initialize the selected HAL LTDC handle and associate a LTDC peripheral instance.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
instance – Specify the LTDC instance.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when hltdc pointer is NULL.
-
HAL_OK – HAL LTDC handle has been correctly initialized.
-
-
void
HAL_LTDC_DeInit
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
De-initialize the given HAL LTDC instance by disabling all interrupts, disabling the LTDC layers and LTDC display, and resetting the state machine.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
- group LTDC_Exported_Functions_Group1
-
This subsection provides a set of functions allowing to initialize and deinitialize the LTDC peripheral:
-
HAL_LTDC_Init() to initialize the selected HAL LTDC handle and associate an LTDC peripheral instance
-
HAL_LTDC_DeInit() to de-initialize the given HAL LTDC instance by disabling the LTDC and LTDC layers, and resetting the state machine
Functions
-
hal_status_t
HAL_LTDC_Init
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_t
instance
)
-
Initialize the selected HAL LTDC handle and associate a LTDC peripheral instance.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
instance – Specify the LTDC instance.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when hltdc pointer is NULL.
-
HAL_OK – HAL LTDC handle has been correctly initialized.
-
-
void
HAL_LTDC_DeInit
(
hal_ltdc_handle_t
*
hltdc
)
-
De-initialize the given HAL LTDC instance by disabling all interrupts, disabling the LTDC layers and LTDC display, and resetting the state machine.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
Global configuration functions ¶
- group LTDC_Exported_Functions_Group2
-
This subsection provides a set of functions allowing to set and get the global LTDC peripheral configuration:
-
HAL_LTDC_SetConfig() : Allowing to set the LTDC timing parameters. Once done the HAL LTDC global state goes to IDLE.
-
HAL_LTDC_GetConfig() : Allowing to retrieve the LTDC timing parameters.
Functions
-
hal_status_t
HAL_LTDC_SetConfig
(
hal_ltdc_handle_t
*
hltdc
,
const
hal_ltdc_config_t
*
p_config
)
¶
-
Configure the LTDC according to the user parameters.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
p_config – Pointer to a hal_ltdc_config_t structure that contains the LTDC configuration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when p_config pointer is NULL
-
HAL_OK – LTDC instance has been correctly configured.
-
-
void
HAL_LTDC_GetConfig
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_config_t
*
p_config
)
¶
-
Get the LTDC configuration.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
p_config – Pointer to a hal_ltdc_config_t structure that contains the LTDC configuration.
-
-
- group LTDC_Exported_Functions_Group2
-
This subsection provides a set of functions allowing to set and get the global LTDC peripheral configuration:
-
HAL_LTDC_SetConfig() : Allowing to set the LTDC timing parameters. Once done the HAL LTDC global state goes to IDLE.
-
HAL_LTDC_GetConfig() : Allowing to retrieve the LTDC timing parameters.
Functions
-
hal_status_t
HAL_LTDC_SetConfig
(
hal_ltdc_handle_t
*
hltdc
,
const
hal_ltdc_config_t
*
p_config
)
-
Configure the LTDC according to the user parameters.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
p_config – Pointer to a hal_ltdc_config_t structure that contains the LTDC configuration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when p_config pointer is NULL
-
HAL_OK – LTDC instance has been correctly configured.
-
-
void
HAL_LTDC_GetConfig
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_config_t
*
p_config
)
-
Get the LTDC configuration.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
p_config – Pointer to a hal_ltdc_config_t structure that contains the LTDC configuration.
-
-
LTDC Layer configuration function ¶
- group LTDC_Exported_Functions_Group3
-
This subsection provides the function allowing to set the LTDC layers configuration:
-
HAL_LTDC_SetConfigLayer() : Configure the given LTDC layer according to the user parameters.
Functions
-
hal_status_t
HAL_LTDC_SetConfigLayer
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
const
hal_ltdc_layer_config_t
*
p_layer_config
)
¶
-
Configure the LTDC layer according to the user parameters.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
p_layer_config – Pointer to a hal_ltdc_layer_config_t structure that contains the LTDC layer configuration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when p_layer_config pointer is NULL
-
HAL_OK – LTDC layer has been correctly configured.
-
-
- group LTDC_Exported_Functions_Group3
-
This subsection provides the function allowing to set the LTDC layers configuration:
-
HAL_LTDC_SetConfigLayer() : Configure the given LTDC layer according to the user parameters.
Functions
-
hal_status_t
HAL_LTDC_SetConfigLayer
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
const
hal_ltdc_layer_config_t
*
p_layer_config
)
-
Configure the LTDC layer according to the user parameters.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
p_layer_config – Pointer to a hal_ltdc_layer_config_t structure that contains the LTDC layer configuration.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when p_layer_config pointer is NULL
-
HAL_OK – LTDC layer has been correctly configured.
-
-
LTDC Start/Stop functions ¶
- group LTDC_Exported_Functions_Group4
-
This subsection provides a set of function allowing to start and stop the LTDC peripheral:
-
HAL_LTDC_Start() : Start the LTDC display.
-
HAL_LTDC_Stop() : Stop the LTDC display.
Functions
-
hal_status_t
HAL_LTDC_Start
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupts
)
¶
-
Start the LTDC.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupts – Specify the LTDC interrupt sources to be enabled while starting. This parameter can be
-
HAL_LTDC_IT_NONE : Neither FIFO Underrun Interrupt nor Transfer Error interrupt to be enabled Or any combination of the following values:
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt
-
-
- Return values :
-
HAL_OK – LTDC started.
-
hal_status_t
HAL_LTDC_Stop
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
Stop the LTDC.
- Parameters :
-
hltdc – LTDC handle
- Return values :
-
HAL_OK – LTDC stopped.
-
- group LTDC_Exported_Functions_Group4
-
This subsection provides a set of function allowing to start and stop the LTDC peripheral:
-
HAL_LTDC_Start() : Start the LTDC display.
-
HAL_LTDC_Stop() : Stop the LTDC display.
Functions
-
hal_status_t
HAL_LTDC_Start
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupts
)
-
Start the LTDC.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupts – Specify the LTDC interrupt sources to be enabled while starting. This parameter can be
-
HAL_LTDC_IT_NONE : Neither FIFO Underrun Interrupt nor Transfer Error interrupt to be enabled Or any combination of the following values:
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt
-
-
- Return values :
-
HAL_OK – LTDC started.
-
hal_status_t
HAL_LTDC_Stop
(
hal_ltdc_handle_t
*
hltdc
)
-
Stop the LTDC.
- Parameters :
-
hltdc – LTDC handle
- Return values :
-
HAL_OK – LTDC stopped.
-
IRQHandler and Callbacks functions ¶
- group LTDC_Exported_Functions_Group5
-
This subsection provides the IRQ handler APIs allowing to handle LTDC interruptions, and Register user Callbacks APIs.
-
HAL_LTDC_IRQHandler() handle all LTDC interrupts.
-
HAL_LTDC_ERR_IRQHandler() handle only LTDC transfer error and FIFO underrun interrupts.
-
HAL_LTDC_LineDetectionIRQHandler() handle only LTDC line detection interrupt.
-
HAL_LTDC_ReloadEventIRQHandler() handle only LTDC register reload interrupt.
-
HAL_LTDC_RegisterErrorCallback() Register the LTDC user Error callback.
-
HAL_LTDC_RegisterLineDetectionCallback() Register the LTDC user Line Detection callback.
-
HAL_LTDC_RegisterReloadEventCallback() Register the LTDC user Reload Event callback.
Functions
-
void
HAL_LTDC_IRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
Handle the LTDC interrupt request.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ERR_IRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
handle LTDC transfer error and FIFO underrun interrupts.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_LineDetectionIRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
handle LTDC line detection interrupt.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ReloadEventIRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
handle LTDC register reload interrupt.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ErrorCallback
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
Error callback.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_LineDetectionCallback
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
Line detection callback.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ReloadEventCallback
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
Reload event callback.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
hal_status_t
HAL_LTDC_RegisterErrorCallback
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_cb_t
p_callback
)
¶
-
Register the LTDC Error callback.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_callback – Specifies the error callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_callback pointer is NULL
-
HAL_OK – LTDC error callback is successfully registered
-
-
hal_status_t
HAL_LTDC_RegisterLineDetectionCallback
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_cb_t
p_callback
)
¶
-
Register the LTDC Line Detection callback.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_callback – Specifies the Line Detection callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_callback pointer is NULL
-
HAL_OK – LTDC Line Detection callback is successfully registered
-
-
hal_status_t
HAL_LTDC_RegisterReloadEventCallback
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_cb_t
p_callback
)
¶
-
Register the LTDC Reload Event callback.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_callback – Specifies the reload event callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_callback pointer is NULL
-
HAL_OK – LTDC reload event callback is successfully registered
-
-
- group LTDC_Exported_Functions_Group5
-
This subsection provides the IRQ handler APIs allowing to handle LTDC interruptions, and Register user Callbacks APIs.
-
HAL_LTDC_IRQHandler() handle all LTDC interrupts.
-
HAL_LTDC_ERR_IRQHandler() handle only LTDC transfer error and FIFO underrun interrupts.
-
HAL_LTDC_LineDetectionIRQHandler() handle only LTDC line detection interrupt.
-
HAL_LTDC_ReloadEventIRQHandler() handle only LTDC register reload interrupt.
-
HAL_LTDC_RegisterErrorCallback() Register the LTDC user Error callback.
-
HAL_LTDC_RegisterLineDetectionCallback() Register the LTDC user Line Detection callback.
-
HAL_LTDC_RegisterReloadEventCallback() Register the LTDC user Reload Event callback.
Functions
-
void
HAL_LTDC_IRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
-
Handle the LTDC interrupt request.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ERR_IRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
-
handle LTDC transfer error and FIFO underrun interrupts.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_LineDetectionIRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
-
handle LTDC line detection interrupt.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ReloadEventIRQHandler
(
hal_ltdc_handle_t
*
hltdc
)
-
handle LTDC register reload interrupt.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ErrorCallback
(
hal_ltdc_handle_t
*
hltdc
)
-
Error callback.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_LineDetectionCallback
(
hal_ltdc_handle_t
*
hltdc
)
-
Line detection callback.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
void
HAL_LTDC_ReloadEventCallback
(
hal_ltdc_handle_t
*
hltdc
)
-
Reload event callback.
- Parameters :
-
hltdc – Pointer to LTDC handle.
-
hal_status_t
HAL_LTDC_RegisterErrorCallback
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_cb_t
p_callback
)
-
Register the LTDC Error callback.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_callback – Specifies the error callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_callback pointer is NULL
-
HAL_OK – LTDC error callback is successfully registered
-
-
hal_status_t
HAL_LTDC_RegisterLineDetectionCallback
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_cb_t
p_callback
)
-
Register the LTDC Line Detection callback.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_callback – Specifies the Line Detection callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_callback pointer is NULL
-
HAL_OK – LTDC Line Detection callback is successfully registered
-
-
hal_status_t
HAL_LTDC_RegisterReloadEventCallback
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_cb_t
p_callback
)
-
Register the LTDC Reload Event callback.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_callback – Specifies the reload event callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when p_callback pointer is NULL
-
HAL_OK – LTDC reload event callback is successfully registered
-
-
Peripheral State, Error functions ¶
- group LTDC_Exported_Functions_Group6
-
This subsection provides a set of functions allowing to retrieve peripheral state and last process errors.
-
HAL_LTDC_GetState() Returns the LTDC handle state
-
HAL_LTDC_GetLayerState() Returns LTDC layer state
-
HAL_LTDC_GetLastErrorCodes() Returns last occurred error code
Functions
-
hal_ltdc_state_t
HAL_LTDC_GetState
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Get the LTDC current state.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
hal_ltdc_state_t – LTDC state, can be one of hal_ltdc_state_t enumeration values
-
hal_ltdc_layer_state_t
HAL_LTDC_GetLayerState
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Get the LTDC layer state.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
layer – LTDC layer index, can be one of hal_ltdc_layer_t enumeration values
-
- Return values :
-
hal_ltdc_layer_state_t – LTDC layer_i state, can be one of hal_ltdc_layer_state_t enumeration values
-
uint32_t
HAL_LTDC_GetLastErrorCodes
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Get last error codes.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
Last – error codes
-
- group LTDC_Exported_Functions_Group6
-
This subsection provides a set of functions allowing to retrieve peripheral state and last process errors.
-
HAL_LTDC_GetState() Returns the LTDC handle state
-
HAL_LTDC_GetLayerState() Returns LTDC layer state
-
HAL_LTDC_GetLastErrorCodes() Returns last occurred error code
Functions
-
hal_ltdc_state_t
HAL_LTDC_GetState
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Get the LTDC current state.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
hal_ltdc_state_t – LTDC state, can be one of hal_ltdc_state_t enumeration values
-
hal_ltdc_layer_state_t
HAL_LTDC_GetLayerState
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Get the LTDC layer state.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
layer – LTDC layer index, can be one of hal_ltdc_layer_t enumeration values
-
- Return values :
-
hal_ltdc_layer_state_t – LTDC layer_i state, can be one of hal_ltdc_layer_state_t enumeration values
-
uint32_t
HAL_LTDC_GetLastErrorCodes
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Get last error codes.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
Last – error codes
-
Optional LTDC functions ¶
- group LTDC_Exported_Functions_Group7
-
This subsection provides a set of optional feature management APIs.
-
HAL_LTDC_SetBackgroundColor() Set the background color.
-
HAL_LTDC_EnableLineDetection() Set and enable the line detection.
-
HAL_LTDC_DisableLineDetection() Disable the line detection.
-
HAL_LTDC_EnableDither() Enable the dither.
-
HAL_LTDC_DisableDither() Disable the dither.
-
HAL_LTDC_IsEnabledDither() Check if the dither is enabled or disabled.
Functions
-
hal_status_t
HAL_LTDC_SetBackgroundColor
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
rgb888_color
)
¶
-
Set the background color.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
rgb888_color – RGB888 color, This parameter must be a value between Min_Data = 0x00000000 and Max_Data = 0x00FFFFFF.
-
- Return values :
-
HAL_OK – Background color configured.
-
hal_status_t
HAL_LTDC_EnableLineDetection
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
line
)
¶
-
Set and enable the line detection.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
line – Line number, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0x7FF.
-
- Return values :
-
HAL_OK – Line detection enabled.
-
hal_status_t
HAL_LTDC_DisableLineDetection
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Disable the line detection.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
HAL_OK – Line detection disabled.
-
hal_status_t
HAL_LTDC_EnableDither
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Enable the dither.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
HAL_OK – Dither enabled.
-
hal_status_t
HAL_LTDC_DisableDither
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Disable the dither.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
HAL_OK – Dither disabled.
-
hal_ltdc_color_dither_status_t
HAL_LTDC_IsEnabledDither
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Check if the dither is enabled or disabled.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
-
HAL_LTDC_COLOR_DITHER_DISABLED – Dither disabled
-
HAL_LTDC_COLOR_DITHER_ENABLED – Dither enabled
-
-
- group LTDC_Exported_Functions_Group7
-
This subsection provides a set of optional feature management APIs.
-
HAL_LTDC_SetBackgroundColor() Set the background color.
-
HAL_LTDC_EnableLineDetection() Set and enable the line detection.
-
HAL_LTDC_DisableLineDetection() Disable the line detection.
-
HAL_LTDC_EnableDither() Enable the dither.
-
HAL_LTDC_DisableDither() Disable the dither.
-
HAL_LTDC_IsEnabledDither() Check if the dither is enabled or disabled.
Functions
-
hal_status_t
HAL_LTDC_SetBackgroundColor
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
rgb888_color
)
-
Set the background color.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
rgb888_color – RGB888 color, This parameter must be a value between Min_Data = 0x00000000 and Max_Data = 0x00FFFFFF.
-
- Return values :
-
HAL_OK – Background color configured.
-
hal_status_t
HAL_LTDC_EnableLineDetection
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
line
)
-
Set and enable the line detection.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
line – Line number, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0x7FF.
-
- Return values :
-
HAL_OK – Line detection enabled.
-
hal_status_t
HAL_LTDC_DisableLineDetection
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Disable the line detection.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
HAL_OK – Line detection disabled.
-
hal_status_t
HAL_LTDC_EnableDither
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Enable the dither.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
HAL_OK – Dither enabled.
-
hal_status_t
HAL_LTDC_DisableDither
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Disable the dither.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
HAL_OK – Dither disabled.
-
hal_ltdc_color_dither_status_t
HAL_LTDC_IsEnabledDither
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Check if the dither is enabled or disabled.
- Parameters :
-
hltdc – Pointer to a hal_ltdc_handle_t structure
- Return values :
-
-
HAL_LTDC_COLOR_DITHER_DISABLED – Dither disabled
-
HAL_LTDC_COLOR_DITHER_ENABLED – Dither enabled
-
-
Optional LTDC layer functions ¶
- group LTDC_Exported_Functions_Group8
-
This subsection provides a set of optional LTDC layer feature management APIs.
-
HAL_LTDC_SetLayerWindowSize() Set the layer window size.(*)
-
HAL_LTDC_SetLayerWindowPosition() Set the layer window position.(*)
-
HAL_LTDC_SetLayerAddress() Set the layer address.
-
HAL_LTDC_SetLayerFrameBuffer() Set a new layer frame buffer including its address, pixel format, width and height.(*)
-
HAL_LTDC_SetLayerPitch() Set the layer pitch value for specific cases where the width is larger than expected to be displayed on screen.
-
HAL_LTDC_SetLayerAlpha() Set the layer alpha.
-
HAL_LTDC_SetLayerBackgroundColor() Set the layer background color.
-
HAL_LTDC_SetConfigLayerColorKeying() Set the layer color keying.
-
HAL_LTDC_EnableLayerColorKeying() Enable the layer color keying.
-
HAL_LTDC_DisableLayerColorKeying() Disable the layer color keying.
-
HAL_LTDC_IsEnabledLayerColorKeying() Check if the layer color keying is enabled or disabled.
-
HAL_LTDC_SetConfigLayerCLUT() Configure the LTDC layer CLUT according to the user parameters.
-
HAL_LTDC_EnableLayerCLUT() Enable the LTDC layer CLUT.
-
HAL_LTDC_DisableLayerCLUT() Disable the LTDC layer CLUT.
-
HAL_LTDC_ForceReload() Reload LTDC Layers configuration. (*) WARNING : Those APIs are meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer()
Functions
-
hal_status_t
HAL_LTDC_SetLayerWindowSize
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
x_size
,
uint32_t
y_size
)
¶
-
Set the layer window size.
Warning
This API is meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer() .
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
x_size – Window horizontal size, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0xFFF.
-
y_size – Window vertical size, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0x7FF.
-
- Return values :
-
HAL_OK – Layer window size configured.
-
hal_status_t
HAL_LTDC_SetLayerWindowPosition
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
x0
,
uint32_t
y0
)
¶
-
Set the layer window position.
Warning
This API is meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer() .
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
x0 – Window horizontal start position, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0xFFF.
-
y0 – Window vertical start position, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0x7FF.
-
- Return values :
-
HAL_OK – Layer window position configured.
-
hal_status_t
HAL_LTDC_SetLayerAddress
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
address
)
¶
-
Set the layer address.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
address – Frame buffer address
-
- Return values :
-
HAL_OK – Layer address configured.
-
hal_status_t
HAL_LTDC_SetLayerFrameBuffer
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
const
hal_ltdc_frame_buffer_t
*
p_frame_buffer
)
¶
-
Set a new layer frame buffer.
Warning
This API is meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer() .
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
p_frame_buffer – Pointer to frame buffer structure definition
-
- Return values :
-
HAL_OK – Layer frame buffer configured.
-
hal_status_t
HAL_LTDC_SetLayerPitch
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
pitch_byte
)
¶
-
Set the layer pitch value for specific cases where the width us larger than expected to be displayed on screen.
Warning
In case of configuring the layer using HAL_LTDC_SetConfigLayer() or HAL_LTDC_SetConfigLayerFlexARGB() or HAL_LTDC_SetConfigLayerFlexYUVCoplanar(), or changing the layer’s frame buffer using HAL_LTDC_SetLayerFrameBuffer() or HAL_LTDC_SetLayerFlexARGBFrameBuffer() or HAL_LTDC_SetLayerFlexYUVCoplanarFrameBuffer() this function have to be recalled.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
pitch – New pitch value.
-
- Return values :
-
HAL_OK – Layer alpha configured.
-
hal_status_t
HAL_LTDC_SetLayerAlpha
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint8_t
alpha
)
¶
-
Set the layer alpha.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
alpha – Alpha value, This parameter must be a value between Min_Data = 0x00 and Max_Data = 0xFF.
-
- Return values :
-
HAL_OK – Layer alpha configured.
-
hal_status_t
HAL_LTDC_SetLayerBackgroundColor
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
color
)
¶
-
Set the layer background color.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
color – Background color. This parameter must be a value between Min_Data = 0x000000 and Max_Data = 0xFFFFFF.
-
- Return values :
-
HAL_OK – Layer background color configured.
-
hal_status_t
HAL_LTDC_SetConfigLayerColorKeying
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
rgb888_color
)
¶
-
Set the layer color keying.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
rgb888_color – RGB888 Color, This parameter must be a value between Min_Data = 0x00000000 and Max_Data = 0x00FFFFFF.
-
- Return values :
-
HAL_OK – Layer color keying configured.
-
hal_status_t
HAL_LTDC_EnableLayerColorKeying
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Enable the layer color keying.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
- Return values :
-
HAL_OK – Layer color keying enabled.
-
hal_status_t
HAL_LTDC_DisableLayerColorKeying
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Disable the layer color keying.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
- Return values :
-
HAL_OK – Layer color keying disabled.
-
hal_ltdc_color_keying_status_t
HAL_LTDC_IsEnabledLayerColorKeying
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Check if the layer color keying is enabled or disabled.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
- Return values :
-
-
HAL_LTDC_COLOR_KEYING_DISABLED – Color keying disabled
-
HAL_LTDC_COLOR_KEYING_ENABLED – Color keying enabled
-
-
hal_status_t
HAL_LTDC_SetConfigLayerCLUT
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
const
uint32_t
*
p_clut
,
uint32_t
clut_size_pixel
)
¶
-
Configure the LTDC layer CLUT according to the user parameters.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
p_clut – Pointer to a p_clut source address.
-
clut_size_pixel – CLUT size in pixel.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when p_clut pointer is NULL
-
HAL_OK – LTDC layer CLUT has been correctly configured.
-
-
hal_status_t
HAL_LTDC_EnableLayerCLUT
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Enable the LTDC layer CLUT.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
- Return values :
-
HAL_OK – LTDC layer CLUT enabled.
-
hal_status_t
HAL_LTDC_DisableLayerCLUT
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Disable the LTDC layer CLUT.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
- Return values :
-
HAL_OK – LTDC layer CLUT disabled.
-
hal_status_t
HAL_LTDC_ForceReload
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_reload_type_t
reload_type
)
¶
-
Reload LTDC Layers configuration.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
reload_type – This parameter can be one of the following values : HAL_LTDC_RELOAD_IMMEDIATE : Immediate Reload HAL_LTDC_RELOAD_VERTICAL_BLANKING : Reload in the next Vertical Blanking
-
- Return values :
-
HAL_OK – Configuration reloaded.
-
- group LTDC_Exported_Functions_Group8
-
This subsection provides a set of optional LTDC layer feature management APIs.
-
HAL_LTDC_SetLayerWindowSize() Set the layer window size.(*)
-
HAL_LTDC_SetLayerWindowPosition() Set the layer window position.(*)
-
HAL_LTDC_SetLayerAddress() Set the layer address.
-
HAL_LTDC_SetLayerFrameBuffer() Set a new layer frame buffer including its address, pixel format, width and height.(*)
-
HAL_LTDC_SetLayerPitch() Set the layer pitch value for specific cases where the width is larger than expected to be displayed on screen.
-
HAL_LTDC_SetLayerAlpha() Set the layer alpha.
-
HAL_LTDC_SetLayerBackgroundColor() Set the layer background color.
-
HAL_LTDC_SetConfigLayerColorKeying() Set the layer color keying.
-
HAL_LTDC_EnableLayerColorKeying() Enable the layer color keying.
-
HAL_LTDC_DisableLayerColorKeying() Disable the layer color keying.
-
HAL_LTDC_IsEnabledLayerColorKeying() Check if the layer color keying is enabled or disabled.
-
HAL_LTDC_SetConfigLayerCLUT() Configure the LTDC layer CLUT according to the user parameters.
-
HAL_LTDC_EnableLayerCLUT() Enable the LTDC layer CLUT.
-
HAL_LTDC_DisableLayerCLUT() Disable the LTDC layer CLUT.
-
HAL_LTDC_ForceReload() Reload LTDC Layers configuration. (*) WARNING : Those APIs are meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer()
Functions
-
hal_status_t
HAL_LTDC_SetLayerWindowSize
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
x_size
,
uint32_t
y_size
)
-
Set the layer window size.
Warning
This API is meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer() .
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
x_size – Window horizontal size, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0xFFF.
-
y_size – Window vertical size, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0x7FF.
-
- Return values :
-
HAL_OK – Layer window size configured.
-
hal_status_t
HAL_LTDC_SetLayerWindowPosition
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
x0
,
uint32_t
y0
)
-
Set the layer window position.
Warning
This API is meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer() .
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
x0 – Window horizontal start position, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0xFFF.
-
y0 – Window vertical start position, This parameter must be a value between Min_Data = 0x000 and Max_Data = 0x7FF.
-
- Return values :
-
HAL_OK – Layer window position configured.
-
hal_status_t
HAL_LTDC_SetLayerAddress
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
address
)
-
Set the layer address.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
address – Frame buffer address
-
- Return values :
-
HAL_OK – Layer address configured.
-
hal_status_t
HAL_LTDC_SetLayerFrameBuffer
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
const
hal_ltdc_frame_buffer_t
*
p_frame_buffer
)
-
Set a new layer frame buffer.
Warning
This API is meant to be used individually, in case you want to configure more then one feature, you must use the HAL_LTDC_SetConfigLayer() .
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
p_frame_buffer – Pointer to frame buffer structure definition
-
- Return values :
-
HAL_OK – Layer frame buffer configured.
-
hal_status_t
HAL_LTDC_SetLayerPitch
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
pitch_byte
)
-
Set the layer pitch value for specific cases where the width us larger than expected to be displayed on screen.
Warning
In case of configuring the layer using HAL_LTDC_SetConfigLayer() or HAL_LTDC_SetConfigLayerFlexARGB() or HAL_LTDC_SetConfigLayerFlexYUVCoplanar(), or changing the layer’s frame buffer using HAL_LTDC_SetLayerFrameBuffer() or HAL_LTDC_SetLayerFlexARGBFrameBuffer() or HAL_LTDC_SetLayerFlexYUVCoplanarFrameBuffer() this function have to be recalled.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
pitch – New pitch value.
-
- Return values :
-
HAL_OK – Layer alpha configured.
-
hal_status_t
HAL_LTDC_SetLayerAlpha
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint8_t
alpha
)
-
Set the layer alpha.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
alpha – Alpha value, This parameter must be a value between Min_Data = 0x00 and Max_Data = 0xFF.
-
- Return values :
-
HAL_OK – Layer alpha configured.
-
hal_status_t
HAL_LTDC_SetLayerBackgroundColor
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
color
)
-
Set the layer background color.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
color – Background color. This parameter must be a value between Min_Data = 0x000000 and Max_Data = 0xFFFFFF.
-
- Return values :
-
HAL_OK – Layer background color configured.
-
hal_status_t
HAL_LTDC_SetConfigLayerColorKeying
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
uint32_t
rgb888_color
)
-
Set the layer color keying.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
rgb888_color – RGB888 Color, This parameter must be a value between Min_Data = 0x00000000 and Max_Data = 0x00FFFFFF.
-
- Return values :
-
HAL_OK – Layer color keying configured.
-
hal_status_t
HAL_LTDC_EnableLayerColorKeying
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Enable the layer color keying.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
- Return values :
-
HAL_OK – Layer color keying enabled.
-
hal_status_t
HAL_LTDC_DisableLayerColorKeying
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Disable the layer color keying.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
- Return values :
-
HAL_OK – Layer color keying disabled.
-
hal_ltdc_color_keying_status_t
HAL_LTDC_IsEnabledLayerColorKeying
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Check if the layer color keying is enabled or disabled.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure
-
layer – Layer index, This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2
-
- Return values :
-
-
HAL_LTDC_COLOR_KEYING_DISABLED – Color keying disabled
-
HAL_LTDC_COLOR_KEYING_ENABLED – Color keying enabled
-
-
hal_status_t
HAL_LTDC_SetConfigLayerCLUT
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
,
const
uint32_t
*
p_clut
,
uint32_t
clut_size_pixel
)
-
Configure the LTDC layer CLUT according to the user parameters.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
p_clut – Pointer to a p_clut source address.
-
clut_size_pixel – CLUT size in pixel.
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when p_clut pointer is NULL
-
HAL_OK – LTDC layer CLUT has been correctly configured.
-
-
hal_status_t
HAL_LTDC_EnableLayerCLUT
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Enable the LTDC layer CLUT.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
- Return values :
-
HAL_OK – LTDC layer CLUT enabled.
-
hal_status_t
HAL_LTDC_DisableLayerCLUT
(
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Disable the LTDC layer CLUT.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
layer – Layer index. This parameter can be one of the following values: HAL_LTDC_LAYER_1 or HAL_LTDC_LAYER_2.
-
- Return values :
-
HAL_OK – LTDC layer CLUT disabled.
-
hal_status_t
HAL_LTDC_ForceReload
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_reload_type_t
reload_type
)
-
Reload LTDC Layers configuration.
- Parameters :
-
-
hltdc – Pointer to a hal_ltdc_handle_t structure.
-
reload_type – This parameter can be one of the following values : HAL_LTDC_RELOAD_IMMEDIATE : Immediate Reload HAL_LTDC_RELOAD_VERTICAL_BLANKING : Reload in the next Vertical Blanking
-
- Return values :
-
HAL_OK – Configuration reloaded.
-
User data functions ¶
- group LTDC_Exported_Functions_Group9
-
This subsection provides functions allowing to:
-
HAL_LTDC_SetUserData() Set a user data pointer (ex: a user context) in a HAL LTDC handle,
-
HAL_LTDC_GetUserData() Get a user data pointer (ex: a user context) from a HAL LTDC handle.
Functions
-
void
HAL_LTDC_SetUserData
(
hal_ltdc_handle_t
*
hltdc
,
const
void
*
p_user_data
)
¶
-
Store the user data into the LTDC handle.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_user_data – Pointer to the user data
-
-
const
void
*
HAL_LTDC_GetUserData
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Retrieve the user data from the LTDC handle.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
Pointer – to the user data
-
- group LTDC_Exported_Functions_Group9
-
This subsection provides functions allowing to:
-
HAL_LTDC_SetUserData() Set a user data pointer (ex: a user context) in a HAL LTDC handle,
-
HAL_LTDC_GetUserData() Get a user data pointer (ex: a user context) from a HAL LTDC handle.
Functions
-
void
HAL_LTDC_SetUserData
(
hal_ltdc_handle_t
*
hltdc
,
const
void
*
p_user_data
)
-
Store the user data into the LTDC handle.
- Parameters :
-
-
hltdc – Pointer to LTDC handle
-
p_user_data – Pointer to the user data
-
-
const
void
*
HAL_LTDC_GetUserData
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Retrieve the user data from the LTDC handle.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
Pointer – to the user data
-
LTDC retrieve clock frequency ¶
- group LTDC_Exported_Functions_Group10
-
This subsection provides the function allowing to retrieve the LTDC clock frequency:
-
HAL_LTDC_GetClockFreq() : Retrieve the LTDC clock frequency.
Functions
-
uint32_t
HAL_LTDC_GetClockFreq
(
const
hal_ltdc_handle_t
*
hltdc
)
¶
-
Return the peripheral clock frequency for LTDC.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
-
uint32_t – Frequency in Hz
-
0 – Source clock of the LTDC not configured or not ready
-
-
- group LTDC_Exported_Functions_Group10
-
This subsection provides the function allowing to retrieve the LTDC clock frequency:
-
HAL_LTDC_GetClockFreq() : Retrieve the LTDC clock frequency.
Functions
-
uint32_t
HAL_LTDC_GetClockFreq
(
const
hal_ltdc_handle_t
*
hltdc
)
-
Return the peripheral clock frequency for LTDC.
- Parameters :
-
hltdc – Pointer to LTDC handle
- Return values :
-
-
uint32_t – Frequency in Hz
-
0 – Source clock of the LTDC not configured or not ready
-
-
Enable/Disable and interrupt functions ¶
- group LTDC_Exported_Functions_Group11
-
This subsection provides unitary functions allowing to:
-
HAL_LTDC_Enable() Enable the LTDC.
-
HAL_LTDC_Disable() Disable the LTDC.
-
HAL_LTDC_EnableLayer() Enable the given LTDC Layer.
-
HAL_LTDC_DisableLayer() Disable the given LTDC Layer.
-
HAL_LTDC_IsActiveFlag() Get the LTDC pending flags.
-
HAL_LTDC_ClearFlag() Clears the LTDC pending flags.
-
HAL_LTDC_EnableIT() Enables the specified LTDC interrupts.
-
HAL_LTDC_DisableIT() Disables the specified LTDC interrupts.
-
HAL_LTDC_IsEnabledIT() Check whether the specified LTDC interrupt is enabled or not.
Functions
-
void
HAL_LTDC_Enable
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
Enable the LTDC.
- Parameters :
-
hltdc – LTDC handle
-
void
HAL_LTDC_Disable
(
hal_ltdc_handle_t
*
hltdc
)
¶
-
Disable the LTDC.
- Parameters :
-
hltdc – LTDC handle
-
void
HAL_LTDC_EnableLayer
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Enable the LTDC Layer.
- Parameters :
-
-
hltdc – LTDC handle
-
layer – Specify the layer to be enabled.
-
-
void
HAL_LTDC_DisableLayer
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
¶
-
Disable the LTDC Layer.
- Parameters :
-
-
hltdc – LTDC handle
-
layer – Specify the layer to be disabled.
-
-
uint32_t
HAL_LTDC_IsActiveFlag
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
flag
)
¶
-
Get the LTDC pending flags.
- Parameters :
-
-
hltdc – LTDC handle
-
flag – Get the specified flag. This parameter can be any combination of the following values:
-
HAL_LTDC_FLAG_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_FLAG_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_FLAG_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_FLAG_RELOAD : Register Reload Interrupt Flag
-
-
- Return values :
-
1 – when the flag is SET, 0 when the flag is RESET.
-
void
HAL_LTDC_ClearFlag
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
flag
)
¶
-
Clears the LTDC pending flags.
- Parameters :
-
-
hltdc – LTDC handle
-
flag – Specify the flag to clear. This parameter can be any combination of the following values:
-
HAL_LTDC_FLAG_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_FLAG_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_FLAG_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_FLAG_RELOAD : Register Reload Interrupt Flag
-
-
-
void
HAL_LTDC_EnableIT
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupt
)
¶
-
Enables the specified LTDC interrupts.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupt – Specify the LTDC interrupt sources to be enabled. This parameter can be any combination of the following values:
-
HAL_LTDC_IT_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_IT_RELOAD : Register Reload Interrupt Flag
-
-
-
void
HAL_LTDC_DisableIT
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupt
)
¶
-
Disables the specified LTDC interrupts.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupt – Specify the LTDC interrupt sources to be disabled. This parameter can be any combination of the following values:
-
HAL_LTDC_IT_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_IT_RELOAD : Register Reload Interrupt Flag
-
-
-
uint32_t
HAL_LTDC_IsEnabledIT
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupt
)
¶
-
Check whether the specified LTDC interrupt is enabled or not.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupt – Specify the LTDC interrupt source to check. This parameter can be one of the following values:
-
HAL_LTDC_IT_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_IT_RELOAD : Register Reload Interrupt Flag
-
-
- Return values :
-
1 – when the interrupt is enabled, 0 when the interrupt is desabled
-
- group LTDC_Exported_Functions_Group11
-
This subsection provides unitary functions allowing to:
-
HAL_LTDC_Enable() Enable the LTDC.
-
HAL_LTDC_Disable() Disable the LTDC.
-
HAL_LTDC_EnableLayer() Enable the given LTDC Layer.
-
HAL_LTDC_DisableLayer() Disable the given LTDC Layer.
-
HAL_LTDC_IsActiveFlag() Get the LTDC pending flags.
-
HAL_LTDC_ClearFlag() Clears the LTDC pending flags.
-
HAL_LTDC_EnableIT() Enables the specified LTDC interrupts.
-
HAL_LTDC_DisableIT() Disables the specified LTDC interrupts.
-
HAL_LTDC_IsEnabledIT() Check whether the specified LTDC interrupt is enabled or not.
Functions
-
void
HAL_LTDC_Enable
(
hal_ltdc_handle_t
*
hltdc
)
-
Enable the LTDC.
- Parameters :
-
hltdc – LTDC handle
-
void
HAL_LTDC_Disable
(
hal_ltdc_handle_t
*
hltdc
)
-
Disable the LTDC.
- Parameters :
-
hltdc – LTDC handle
-
void
HAL_LTDC_EnableLayer
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Enable the LTDC Layer.
- Parameters :
-
-
hltdc – LTDC handle
-
layer – Specify the layer to be enabled.
-
-
void
HAL_LTDC_DisableLayer
(
const
hal_ltdc_handle_t
*
hltdc
,
hal_ltdc_layer_t
layer
)
-
Disable the LTDC Layer.
- Parameters :
-
-
hltdc – LTDC handle
-
layer – Specify the layer to be disabled.
-
-
uint32_t
HAL_LTDC_IsActiveFlag
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
flag
)
-
Get the LTDC pending flags.
- Parameters :
-
-
hltdc – LTDC handle
-
flag – Get the specified flag. This parameter can be any combination of the following values:
-
HAL_LTDC_FLAG_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_FLAG_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_FLAG_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_FLAG_RELOAD : Register Reload Interrupt Flag
-
-
- Return values :
-
1 – when the flag is SET, 0 when the flag is RESET.
-
void
HAL_LTDC_ClearFlag
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
flag
)
-
Clears the LTDC pending flags.
- Parameters :
-
-
hltdc – LTDC handle
-
flag – Specify the flag to clear. This parameter can be any combination of the following values:
-
HAL_LTDC_FLAG_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_FLAG_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_FLAG_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_FLAG_RELOAD : Register Reload Interrupt Flag
-
-
-
void
HAL_LTDC_EnableIT
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupt
)
-
Enables the specified LTDC interrupts.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupt – Specify the LTDC interrupt sources to be enabled. This parameter can be any combination of the following values:
-
HAL_LTDC_IT_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_IT_RELOAD : Register Reload Interrupt Flag
-
-
-
void
HAL_LTDC_DisableIT
(
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupt
)
-
Disables the specified LTDC interrupts.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupt – Specify the LTDC interrupt sources to be disabled. This parameter can be any combination of the following values:
-
HAL_LTDC_IT_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_IT_RELOAD : Register Reload Interrupt Flag
-
-
-
uint32_t
HAL_LTDC_IsEnabledIT
(
const
hal_ltdc_handle_t
*
hltdc
,
uint32_t
interrupt
)
-
Check whether the specified LTDC interrupt is enabled or not.
- Parameters :
-
-
hltdc – LTDC handle
-
interrupt – Specify the LTDC interrupt source to check. This parameter can be one of the following values:
-
HAL_LTDC_IT_LINE_INTERRUPT: Line Interrupt Flag
-
HAL_LTDC_IT_FIFO_UNDERRUN : FIFO Underrun Interrupt Flag
-
HAL_LTDC_IT_TRANSFER_ERROR: Transfer Error interrupt Flag
-
HAL_LTDC_IT_RELOAD : Register Reload Interrupt Flag
-
-
- Return values :
-
1 – when the interrupt is enabled, 0 when the interrupt is desabled
-