思澈科技软件开发工具包  2.20
Peripheral Control functions

Peripheral Control functions. More...

Functions

HAL_StatusTypeDef HAL_DSI_SetGenericVCID (DSI_HandleTypeDef *hdsi, uint32_t VirtualChannelID)
 Configure the Generic interface read-back Virtual Channel ID. More...
 
HAL_StatusTypeDef HAL_DSI_ConfigVideoMode (DSI_HandleTypeDef *hdsi, DSI_VidCfgTypeDef *VidCfg)
 
HAL_StatusTypeDef HAL_DSI_ConfigAdaptedCommandMode (DSI_HandleTypeDef *hdsi, DSI_CmdCfgTypeDef *CmdCfg)
 Select adapted command mode and configure the corresponding parameters. More...
 
HAL_StatusTypeDef HAL_DSI_ConfigCommand (DSI_HandleTypeDef *hdsi, DSI_LPCmdTypeDef *LPCmd)
 Configure command transmission mode: High-speed or Low-power and enable/disable acknowledge request after packet transmission. More...
 
HAL_StatusTypeDef HAL_DSI_ConfigFlowControl (DSI_HandleTypeDef *hdsi, uint32_t FlowControl)
 Configure the flow control parameters. More...
 
HAL_StatusTypeDef HAL_DSI_ConfigPhyTimer (DSI_HandleTypeDef *hdsi, DSI_PHY_TimerTypeDef *PhyTimers)
 Configure the DSI PHY timer parameters. More...
 
HAL_StatusTypeDef HAL_DSI_ConfigHostTimeouts (DSI_HandleTypeDef *hdsi, DSI_HOST_TimeoutTypeDef *HostTimeouts)
 Configure the DSI HOST timeout parameters. More...
 
HAL_StatusTypeDef HAL_DSI_ConfigPhyFreq (DSI_HandleTypeDef *hdsi, uint32_t freq)
 Configure the DSI PHY frequency. More...
 
HAL_StatusTypeDef HAL_DSI_SetPaticalSend (DSI_HandleTypeDef *hdsi, uint32_t write_size)
 Set patial write buffer bytes. More...
 
HAL_StatusTypeDef HAL_DSI_DirectSend (DSI_HandleTypeDef *hdsi, uint32_t write_size)
 Set direct write buffer bytes. More...
 
HAL_StatusTypeDef HAL_DSI_Start (DSI_HandleTypeDef *hdsi)
 Start the DSI module. More...
 
HAL_StatusTypeDef HAL_DSI_bypass_output (DSI_HandleTypeDef *hdsi, bool bypass)
 Bypass all lane output on bus. More...
 
HAL_StatusTypeDef HAL_DSI_Stop (DSI_HandleTypeDef *hdsi)
 Stop the DSI module. More...
 
HAL_StatusTypeDef HAL_DSI_ShortWrite (DSI_HandleTypeDef *hdsi, uint32_t ChannelID, uint32_t Mode, uint32_t Param1, uint32_t Param2)
 write short DCS or short Generic command More...
 
HAL_StatusTypeDef HAL_DSI_LongWrite (DSI_HandleTypeDef *hdsi, uint32_t ChannelID, uint32_t Mode, uint32_t NbParams, uint32_t Param1, uint8_t *ParametersTable)
 write long DCS or long Generic command More...
 
HAL_StatusTypeDef HAL_DSI_Read (DSI_HandleTypeDef *hdsi, uint32_t ChannelNbr, uint8_t *Array, uint32_t Size, uint32_t Mode, uint32_t DCSCmd, uint8_t *ParametersTable)
 Read command (DCS or generic) More...
 
HAL_StatusTypeDef HAL_DSI_EnterULPMData (DSI_HandleTypeDef *hdsi)
 Enter the ULPM (Ultra Low Power Mode) with the D-PHY PLL running (only data lanes are in ULPM) More...
 
HAL_StatusTypeDef HAL_DSI_ExitULPMData (DSI_HandleTypeDef *hdsi)
 Exit the ULPM (Ultra Low Power Mode) with the D-PHY PLL running (only data lanes are in ULPM) More...
 
HAL_StatusTypeDef HAL_DSI_EnterULPM (DSI_HandleTypeDef *hdsi)
 Enter the ULPM (Ultra Low Power Mode) with the D-PHY PLL turned off (both data and clock lanes are in ULPM) More...
 
HAL_StatusTypeDef HAL_DSI_ExitULPM (DSI_HandleTypeDef *hdsi)
 Exit the ULPM (Ultra Low Power Mode) with the D-PHY PLL turned off (both data and clock lanes are in ULPM) More...
 
HAL_StatusTypeDef HAL_DSI_ConfigErrorMonitor (DSI_HandleTypeDef *hdsi, uint32_t ActiveErrors)
 Enable the error monitor flags. More...
 
HAL_StatusTypeDef HAL_DSI_EnterCKLaneHSM (DSI_HandleTypeDef *hdsi)
 Clock lane Enter the HighSpeed mode and close clock lane auto control. More...
 
HAL_StatusTypeDef HAL_DSI_ExitCKLaneHSM (DSI_HandleTypeDef *hdsi)
 Resume clock lane auto control by hdsi->Init.AutomaticClockLaneControl. More...
 
uint8_t HAL_DSI_IsBusy (DSI_HandleTypeDef *hdsi)
 Check DSI is busy. More...
 

Detailed Description

Peripheral Control functions.

 ===============================================================================
                    ##### Peripheral Control functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Configure the Generic interface read-back Virtual Channel ID
      (+) Select video mode and configure the corresponding parameters
      (+) Configure command transmission mode: High-speed or Low-power
      (+) Configure the flow control
      (+) Configure the DSI PHY timer
      (+) Configure the DSI HOST timeout
      (+) Configure the DSI HOST timeout
      (+) Start/Stop the DSI module
      (+) Refresh the display in command mode
      (+) Controls the display color mode in Video mode
      (+) Control the display shutdown in Video mode
      (+) write short DCS or short Generic command
      (+) write long DCS or long Generic command
      (+) Read command (DCS or generic)
      (+) Enter/Exit the Ultra Low Power Mode on data only (D-PHY PLL running)
      (+) Enter/Exit the Ultra Low Power Mode on data only and clock (D-PHY PLL turned off)
      (+) Start/Stop test pattern generation
      (+) Slew-Rate And Delay Tuning
      (+) Low-Power Reception Filter Tuning
      (+) Activate an additional current path on all lanes to meet the SDDTx parameter
      (+) Custom lane pins configuration
      (+) Set custom timing for the PHY
      (+) Force the Clock/Data Lane in TX Stop Mode
      (+) Force LP Receiver in Low-Power Mode
      (+) Force Data Lanes in RX Mode after a BTA
      (+) Enable a pull-down on the lanes to prevent from floating states when unused
      (+) Switch off the contention detection on data lanes

Function Documentation

◆ HAL_DSI_bypass_output()

HAL_StatusTypeDef HAL_DSI_bypass_output ( DSI_HandleTypeDef hdsi,
bool  bypass 
)

Bypass all lane output on bus.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
bypass1: bypass enabled, 0: bypass disabled.
Return values
HALstatus

◆ HAL_DSI_ConfigAdaptedCommandMode()

HAL_StatusTypeDef HAL_DSI_ConfigAdaptedCommandMode ( DSI_HandleTypeDef hdsi,
DSI_CmdCfgTypeDef CmdCfg 
)

Select adapted command mode and configure the corresponding parameters.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
CmdCfgpointer to a DSI_CmdCfgTypeDef structure that contains the DSI command mode configuration parameters
Return values
HALstatus

◆ HAL_DSI_ConfigCommand()

HAL_StatusTypeDef HAL_DSI_ConfigCommand ( DSI_HandleTypeDef hdsi,
DSI_LPCmdTypeDef LPCmd 
)

Configure command transmission mode: High-speed or Low-power and enable/disable acknowledge request after packet transmission.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
LPCmdpointer to a DSI_LPCmdTypeDef structure that contains the DSI command transmission mode configuration parameters
Return values
HALstatus

◆ HAL_DSI_ConfigErrorMonitor()

HAL_StatusTypeDef HAL_DSI_ConfigErrorMonitor ( DSI_HandleTypeDef hdsi,
uint32_t  ActiveErrors 
)

Enable the error monitor flags.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
ActiveErrorsindicates which error interrupts will be enabled. This parameter can be any combination of DSI Error Data Type.
Return values
HALstatus

◆ HAL_DSI_ConfigFlowControl()

HAL_StatusTypeDef HAL_DSI_ConfigFlowControl ( DSI_HandleTypeDef hdsi,
uint32_t  FlowControl 
)

Configure the flow control parameters.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
FlowControlflow control feature(s) to be enabled. This parameter can be any combination of DSI Flow Control.
Return values
HALstatus

◆ HAL_DSI_ConfigHostTimeouts()

HAL_StatusTypeDef HAL_DSI_ConfigHostTimeouts ( DSI_HandleTypeDef hdsi,
DSI_HOST_TimeoutTypeDef HostTimeouts 
)

Configure the DSI HOST timeout parameters.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
HostTimeoutsDSI_HOST_TimeoutTypeDef structure that contains the DSI host timeout parameters
Return values
HALstatus

◆ HAL_DSI_ConfigPhyFreq()

HAL_StatusTypeDef HAL_DSI_ConfigPhyFreq ( DSI_HandleTypeDef hdsi,
uint32_t  freq 
)

Configure the DSI PHY frequency.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
freqDSI frequency.
Return values
HALstatus

◆ HAL_DSI_ConfigPhyTimer()

HAL_StatusTypeDef HAL_DSI_ConfigPhyTimer ( DSI_HandleTypeDef hdsi,
DSI_PHY_TimerTypeDef PhyTimers 
)

Configure the DSI PHY timer parameters.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
PhyTimersDSI_PHY_TimerTypeDef structure that contains the DSI PHY timing parameters
Return values
HALstatus

◆ HAL_DSI_DirectSend()

HAL_StatusTypeDef HAL_DSI_DirectSend ( DSI_HandleTypeDef hdsi,
uint32_t  write_size 
)

Set direct write buffer bytes.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
write_size- framebuffer bytes
Returns

◆ HAL_DSI_EnterCKLaneHSM()

HAL_StatusTypeDef HAL_DSI_EnterCKLaneHSM ( DSI_HandleTypeDef hdsi)

Clock lane Enter the HighSpeed mode and close clock lane auto control.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus

◆ HAL_DSI_EnterULPM()

HAL_StatusTypeDef HAL_DSI_EnterULPM ( DSI_HandleTypeDef hdsi)

Enter the ULPM (Ultra Low Power Mode) with the D-PHY PLL turned off (both data and clock lanes are in ULPM)

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus

◆ HAL_DSI_EnterULPMData()

HAL_StatusTypeDef HAL_DSI_EnterULPMData ( DSI_HandleTypeDef hdsi)

Enter the ULPM (Ultra Low Power Mode) with the D-PHY PLL running (only data lanes are in ULPM)

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus

◆ HAL_DSI_ExitCKLaneHSM()

HAL_StatusTypeDef HAL_DSI_ExitCKLaneHSM ( DSI_HandleTypeDef hdsi)

Resume clock lane auto control by hdsi->Init.AutomaticClockLaneControl.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus

◆ HAL_DSI_ExitULPM()

HAL_StatusTypeDef HAL_DSI_ExitULPM ( DSI_HandleTypeDef hdsi)

Exit the ULPM (Ultra Low Power Mode) with the D-PHY PLL turned off (both data and clock lanes are in ULPM)

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus

◆ HAL_DSI_ExitULPMData()

HAL_StatusTypeDef HAL_DSI_ExitULPMData ( DSI_HandleTypeDef hdsi)

Exit the ULPM (Ultra Low Power Mode) with the D-PHY PLL running (only data lanes are in ULPM)

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus

◆ HAL_DSI_IsBusy()

uint8_t HAL_DSI_IsBusy ( DSI_HandleTypeDef hdsi)

Check DSI is busy.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus, TRUE if during BTA, or reading, writting

◆ HAL_DSI_LongWrite()

HAL_StatusTypeDef HAL_DSI_LongWrite ( DSI_HandleTypeDef hdsi,
uint32_t  ChannelID,
uint32_t  Mode,
uint32_t  NbParams,
uint32_t  Param1,
uint8_t *  ParametersTable 
)

write long DCS or long Generic command

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
ChannelIDVirtual channel ID.
ModeDSI long packet data type. This parameter can be any value of DSI LONG WRITE PKT Data Type.
NbParamsNumber of parameters.
Param1DSC command or first generic parameter. This parameter can be any value of DSI DCS Command or a generic command code
ParametersTablePointer to parameter values table.
Return values
HALstatus

◆ HAL_DSI_Read()

HAL_StatusTypeDef HAL_DSI_Read ( DSI_HandleTypeDef hdsi,
uint32_t  ChannelNbr,
uint8_t *  Array,
uint32_t  Size,
uint32_t  Mode,
uint32_t  DCSCmd,
uint8_t *  ParametersTable 
)

Read command (DCS or generic)

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
ChannelNbrVirtual channel ID
Arraypointer to a buffer to store the payload of a read back operation.
SizeData size to be read (in byte).
ModeDSI read packet data type. This parameter can be any value of DSI SHORT READ PKT Data Type.
DCSCmdDCS get/read command.
ParametersTablePointer to parameter values table.
Return values
HALstatus

◆ HAL_DSI_SetGenericVCID()

HAL_StatusTypeDef HAL_DSI_SetGenericVCID ( DSI_HandleTypeDef hdsi,
uint32_t  VirtualChannelID 
)

Configure the Generic interface read-back Virtual Channel ID.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
VirtualChannelIDVirtual channel ID
Return values
HALstatus

◆ HAL_DSI_SetPaticalSend()

HAL_StatusTypeDef HAL_DSI_SetPaticalSend ( DSI_HandleTypeDef hdsi,
uint32_t  write_size 
)

Set patial write buffer bytes.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
write_size- framebuffer bytes
Returns

◆ HAL_DSI_ShortWrite()

HAL_StatusTypeDef HAL_DSI_ShortWrite ( DSI_HandleTypeDef hdsi,
uint32_t  ChannelID,
uint32_t  Mode,
uint32_t  Param1,
uint32_t  Param2 
)

write short DCS or short Generic command

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
ChannelIDVirtual channel ID.
ModeDSI short packet data type. This parameter can be any value of DSI SHORT WRITE PKT Data Type.
Param1DSC command or first generic parameter. This parameter can be any value of DSI DCS Command or a generic command code.
Param2DSC parameter or second generic parameter.
Return values
HALstatus

◆ HAL_DSI_Start()

HAL_StatusTypeDef HAL_DSI_Start ( DSI_HandleTypeDef hdsi)

Start the DSI module.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus

◆ HAL_DSI_Stop()

HAL_StatusTypeDef HAL_DSI_Stop ( DSI_HandleTypeDef hdsi)

Stop the DSI module.

Parameters
hdsipointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.
Return values
HALstatus