discoverpixy
Functions
Initialization and Configuration functions

Initialization and Configuration functions. More...

Collaboration diagram for Initialization and Configuration functions:

Functions

void LTDC_DeInit (void)
 Deinitializes the LTDC peripheral registers to their default reset values. More...
 
void LTDC_Init (LTDC_InitTypeDef *LTDC_InitStruct)
 Initializes the LTDC peripheral according to the specified parameters in the LTDC_InitStruct. More...
 
void LTDC_StructInit (LTDC_InitTypeDef *LTDC_InitStruct)
 Fills each LTDC_InitStruct member with its default value. More...
 
void LTDC_Cmd (FunctionalState NewState)
 Enables or disables the LTDC Controller. More...
 
void LTDC_DitherCmd (FunctionalState NewState)
 Enables or disables Dither. More...
 
LTDC_RGBTypeDef LTDC_GetRGBWidth (void)
 Get the dither RGB width. More...
 
void LTDC_RGBStructInit (LTDC_RGBTypeDef *LTDC_RGB_InitStruct)
 Fills each LTDC_RGBStruct member with its default value. More...
 
void LTDC_LIPConfig (uint32_t LTDC_LIPositionConfig)
 Define the position of the line interrupt . More...
 
void LTDC_ReloadConfig (uint32_t LTDC_Reload)
 reload layers registers with new parameters More...
 
void LTDC_LayerInit (LTDC_Layer_TypeDef *LTDC_Layerx, LTDC_Layer_InitTypeDef *LTDC_Layer_InitStruct)
 Initializes the LTDC Layer according to the specified parameters in the LTDC_LayerStruct. More...
 
void LTDC_LayerStructInit (LTDC_Layer_InitTypeDef *LTDC_Layer_InitStruct)
 Fills each LTDC_Layer_InitStruct member with its default value. More...
 
void LTDC_LayerCmd (LTDC_Layer_TypeDef *LTDC_Layerx, FunctionalState NewState)
 Enables or disables the LTDC_Layer Controller. More...
 
LTDC_PosTypeDef LTDC_GetPosStatus (void)
 Get the current position. More...
 
void LTDC_PosStructInit (LTDC_PosTypeDef *LTDC_Pos_InitStruct)
 Fills each LTDC_Pos_InitStruct member with its default value. More...
 
FlagStatus LTDC_GetCDStatus (uint32_t LTDC_CD)
 Checks whether the specified LTDC's flag is set or not. More...
 
void LTDC_ColorKeyingConfig (LTDC_Layer_TypeDef *LTDC_Layerx, LTDC_ColorKeying_InitTypeDef *LTDC_colorkeying_InitStruct, FunctionalState NewState)
 Set and configure the color keying. More...
 
void LTDC_ColorKeyingStructInit (LTDC_ColorKeying_InitTypeDef *LTDC_colorkeying_InitStruct)
 Fills each LTDC_colorkeying_InitStruct member with its default value. More...
 
void LTDC_CLUTCmd (LTDC_Layer_TypeDef *LTDC_Layerx, FunctionalState NewState)
 Enables or disables CLUT. More...
 
void LTDC_CLUTInit (LTDC_Layer_TypeDef *LTDC_Layerx, LTDC_CLUT_InitTypeDef *LTDC_CLUT_InitStruct)
 configure the CLUT. More...
 
void LTDC_CLUTStructInit (LTDC_CLUT_InitTypeDef *LTDC_CLUT_InitStruct)
 Fills each LTDC_CLUT_InitStruct member with its default value. More...
 
void LTDC_LayerPosition (LTDC_Layer_TypeDef *LTDC_Layerx, uint16_t OffsetX, uint16_t OffsetY)
 reconfigure the layer position. More...
 
void LTDC_LayerAlpha (LTDC_Layer_TypeDef *LTDC_Layerx, uint8_t ConstantAlpha)
 reconfigure constant alpha. More...
 
void LTDC_LayerAddress (LTDC_Layer_TypeDef *LTDC_Layerx, uint32_t Address)
 reconfigure layer address. More...
 
void LTDC_LayerSize (LTDC_Layer_TypeDef *LTDC_Layerx, uint32_t Width, uint32_t Height)
 reconfigure layer size. More...
 
void LTDC_LayerPixelFormat (LTDC_Layer_TypeDef *LTDC_Layerx, uint32_t PixelFormat)
 reconfigure layer pixel format. More...
 

Detailed Description

Initialization and Configuration functions.

 ===============================================================================
            ##### Initialization and Configuration functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Initialize and configure the LTDC
      (+) Enable or Disable Dither
      (+) Define the position of the line interrupt
      (+) reload layers registers with new parameters
      (+) Initialize and configure layer1 and layer2
      (+) Set and configure the color keying functionality
      (+) Configure and Enables or disables CLUT 

Function Documentation

void LTDC_CLUTCmd ( LTDC_Layer_TypeDef LTDC_Layerx,
FunctionalState  NewState 
)

Enables or disables CLUT.

Parameters
NewStatenew state of CLUT.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2 This parameter can be: ENABLE or DISABLE.
Return values
None
void LTDC_CLUTInit ( LTDC_Layer_TypeDef LTDC_Layerx,
LTDC_CLUT_InitTypeDef LTDC_CLUT_InitStruct 
)

configure the CLUT.

Parameters
LTDC_CLUT_InitStructpointer to a LTDC_CLUT_InitTypeDef structure that contains the CLUT configuration.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
Return values
None
void LTDC_CLUTStructInit ( LTDC_CLUT_InitTypeDef LTDC_CLUT_InitStruct)

Fills each LTDC_CLUT_InitStruct member with its default value.

Parameters
LTDC_CLUT_InitStructpointer to a LTDC_CLUT_InitTypeDef structure which will be initialized.
Return values
None

< Initialize the CLUT adress and RGB values

void LTDC_Cmd ( FunctionalState  NewState)

Enables or disables the LTDC Controller.

Parameters
NewStatenew state of the LTDC peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None
void LTDC_ColorKeyingConfig ( LTDC_Layer_TypeDef LTDC_Layerx,
LTDC_ColorKeying_InitTypeDef LTDC_colorkeying_InitStruct,
FunctionalState  NewState 
)

Set and configure the color keying.

Parameters
LTDC_colorkeying_InitStructpointer to a LTDC_ColorKeying_InitTypeDef structure that contains the color keying configuration.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
Return values
None
void LTDC_ColorKeyingStructInit ( LTDC_ColorKeying_InitTypeDef LTDC_colorkeying_InitStruct)

Fills each LTDC_colorkeying_InitStruct member with its default value.

Parameters
LTDC_colorkeying_InitStructpointer to a LTDC_ColorKeying_InitTypeDef structure which will be initialized.
Return values
None

< Initialize the color keying values

void LTDC_DeInit ( void  )

Deinitializes the LTDC peripheral registers to their default reset values.

Parameters
None
Return values
None

Here is the call graph for this function:

void LTDC_DitherCmd ( FunctionalState  NewState)

Enables or disables Dither.

Parameters
NewStatenew state of the Dither. This parameter can be: ENABLE or DISABLE.
Return values
None
FlagStatus LTDC_GetCDStatus ( uint32_t  LTDC_CD)

Checks whether the specified LTDC's flag is set or not.

Parameters
LTDC_CDspecifies the flag to check. This parameter can be one of the following values:
  • LTDC_CD_VDES: vertical data enable current status.
  • LTDC_CD_HDES: horizontal data enable current status.
  • LTDC_CD_VSYNC: Vertical Synchronization current status.
  • LTDC_CD_HSYNC: Horizontal Synchronization current status.
Return values
Thenew state of LTDC_CD (SET or RESET).
LTDC_PosTypeDef LTDC_GetPosStatus ( void  )

Get the current position.

Parameters
LTDC_Pos_InitStructpointer to a LTDC_PosTypeDef structure that contains the current position.
Return values
None
LTDC_RGBTypeDef LTDC_GetRGBWidth ( void  )

Get the dither RGB width.

Parameters
LTDC_RGB_InitStructpointer to a LTDC_RGBTypeDef structure that contains the Dither RGB width.
Return values
None
void LTDC_Init ( LTDC_InitTypeDef LTDC_InitStruct)

Initializes the LTDC peripheral according to the specified parameters in the LTDC_InitStruct.

Note
This function can be used only when the LTDC is disabled.
Parameters
LTDC_InitStructpointer to a LTDC_InitTypeDef structure that contains the configuration information for the specified LTDC peripheral.
Return values
None
void LTDC_LayerAddress ( LTDC_Layer_TypeDef LTDC_Layerx,
uint32_t  Address 
)

reconfigure layer address.

Parameters
AddressThe color frame buffer start address.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
Return values
Reloadof the shadow registers values must be applied after layer address reconfiguration.
void LTDC_LayerAlpha ( LTDC_Layer_TypeDef LTDC_Layerx,
uint8_t  ConstantAlpha 
)

reconfigure constant alpha.

Parameters
ConstantAlphaconstant alpha value.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
Return values
Reloadof the shadow registers values must be applied after constant alpha reconfiguration.
void LTDC_LayerCmd ( LTDC_Layer_TypeDef LTDC_Layerx,
FunctionalState  NewState 
)

Enables or disables the LTDC_Layer Controller.

Parameters
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
NewStatenew state of the LTDC_Layer peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None
void LTDC_LayerInit ( LTDC_Layer_TypeDef LTDC_Layerx,
LTDC_Layer_InitTypeDef LTDC_Layer_InitStruct 
)

Initializes the LTDC Layer according to the specified parameters in the LTDC_LayerStruct.

Note
This function can be used only when the LTDC is disabled.
Parameters
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
LTDC_LayerStructpointer to a LTDC_LayerTypeDef structure that contains the configuration information for the specified LTDC peripheral.
Return values
None
void LTDC_LayerPixelFormat ( LTDC_Layer_TypeDef LTDC_Layerx,
uint32_t  PixelFormat 
)

reconfigure layer pixel format.

Parameters
PixelFormatreconfigure the pixel format, this parameter can be one of the following values:LTDC_Pixelformat.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
Return values
Reloadof the shadow registers values must be applied after layer pixel format reconfiguration.
void LTDC_LayerPosition ( LTDC_Layer_TypeDef LTDC_Layerx,
uint16_t  OffsetX,
uint16_t  OffsetY 
)

reconfigure the layer position.

Parameters
OffsetXhorizontal offset from start active width .
OffsetYvertical offset from start active height.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
Return values
Reloadof the shadow registers values must be applied after layer position reconfiguration.
void LTDC_LayerSize ( LTDC_Layer_TypeDef LTDC_Layerx,
uint32_t  Width,
uint32_t  Height 
)

reconfigure layer size.

Parameters
Widthlayer window width.
Heightlayer window height.
LTDC_layerxSelect the layer to be configured, this parameter can be one of the following values: LTDC_Layer1, LTDC_Layer2
Return values
Reloadof the shadow registers values must be applied after layer size reconfiguration.
void LTDC_LayerStructInit ( LTDC_Layer_InitTypeDef LTDC_Layer_InitStruct)

Fills each LTDC_Layer_InitStruct member with its default value.

Parameters
LTDC_Layer_InitStructpointer to a LTDC_LayerTypeDef structure which will be initialized.
Return values
None

< Initialize the horizontal limit member

< Initialize the vertical limit member

< Initialize the pixel format member

< Initialize the constant alpha value

< Initialize the default color values

< Initialize the blending factors

< Initialize the frame buffer start address

< Initialize the frame buffer pitch and line length

< Initialize the frame buffer line number

void LTDC_LIPConfig ( uint32_t  LTDC_LIPositionConfig)

Define the position of the line interrupt .

Parameters
LTDC_LIPositionConfigLine Interrupt Position.
Return values
None
void LTDC_PosStructInit ( LTDC_PosTypeDef LTDC_Pos_InitStruct)

Fills each LTDC_Pos_InitStruct member with its default value.

Parameters
LTDC_Pos_InitStructpointer to a LTDC_PosTypeDef structure which will be initialized.
Return values
None
void LTDC_ReloadConfig ( uint32_t  LTDC_Reload)

reload layers registers with new parameters

Parameters
LTDC_Reloadspecifies the type of reload. This parameter can be one of the following values:
  • LTDC_IMReload: Vertical blanking reload.
  • LTDC_VBReload: Immediate reload.
Return values
None
void LTDC_RGBStructInit ( LTDC_RGBTypeDef LTDC_RGB_InitStruct)

Fills each LTDC_RGBStruct member with its default value.

Parameters
LTDC_RGB_InitStructpointer to a LTDC_RGBTypeDef structure which will be initialized.
Return values
None
void LTDC_StructInit ( LTDC_InitTypeDef LTDC_InitStruct)

Fills each LTDC_InitStruct member with its default value.

Parameters
LTDC_InitStructpointer to a LTDC_InitTypeDef structure which will be initialized.
Return values
None

< Initialize the LTDC_HSPolarity member

< Initialize the LTDC_VSPolarity member

< Initialize the LTDC_DEPolarity member

< Initialize the LTDC_PCPolarity member

< Initialize the LTDC_HorizontalSync member

< Initialize the LTDC_VerticalSync member

< Initialize the LTDC_AccumulatedHBP member

< Initialize the LTDC_AccumulatedVBP member

< Initialize the LTDC_AccumulatedActiveW member

< Initialize the LTDC_AccumulatedActiveH member

< Initialize the LTDC_TotalWidth member

< Initialize the LTDC_TotalHeigh member

< Initialize the LTDC_BackgroundRedValue member

< Initialize the LTDC_BackgroundGreenValue member

< Initialize the LTDC_BackgroundBlueValue member