bf0_hal_dsi.h

Author

Sifli software development team

Defines

DSI_ENTER_IDLE_MODE
DSI_ENTER_INVERT_MODE
DSI_ENTER_NORMAL_MODE
DSI_ENTER_PARTIAL_MODE
DSI_ENTER_SLEEP_MODE
DSI_EXIT_IDLE_MODE
DSI_EXIT_INVERT_MODE
DSI_EXIT_SLEEP_MODE
DSI_GET_3D_CONTROL
DSI_GET_ADDRESS_MODE
DSI_GET_BLUE_CHANNEL
DSI_GET_DIAGNOSTIC_RESULT
DSI_GET_DISPLAY_MODE
DSI_GET_GREEN_CHANNEL
DSI_GET_PIXEL_FORMAT
DSI_GET_POWER_MODE
DSI_GET_RED_CHANNEL
DSI_GET_SCANLINE
DSI_GET_SIGNAL_MODE
DSI_NOP
DSI_READ_DDB_CONTINUE
DSI_READ_DDB_START
DSI_READ_MEMORY_CONTINUE
DSI_READ_MEMORY_START
DSI_SET_3D_CONTROL
DSI_SET_ADDRESS_MODE
DSI_SET_COLUMN_ADDRESS
DSI_SET_DISPLAY_OFF
DSI_SET_DISPLAY_ON
DSI_SET_GAMMA_CURVE
DSI_SET_PAGE_ADDRESS
DSI_SET_PARTIAL_COLUMNS
DSI_SET_PARTIAL_ROWS
DSI_SET_PIXEL_FORMAT
DSI_SET_SCROLL_AREA
DSI_SET_SCROLL_START
DSI_SET_TEAR_OFF
DSI_SET_TEAR_ON
DSI_SET_TEAR_SCANLINE
DSI_SET_VSYNC_TIMING
DSI_SOFT_RESET
DSI_WRITE_LUT
DSI_WRITE_MEMORY_CONTINUE
DSI_WRITE_MEMORY_START
DSI_VID_MODE_NB_PULSES
DSI_VID_MODE_NB_EVENTS
DSI_VID_MODE_BURST
DSI_COLOR_MODE_FULL
DSI_COLOR_MODE_EIGHT
DSI_DISPLAY_ON
DSI_DISPLAY_OFF
DSI_LP_COMMAND_DISABLE
DSI_LP_COMMAND_ENABLE
DSI_LP_HFP_DISABLE
DSI_LP_HFP_ENABLE
DSI_LP_HBP_DISABLE
DSI_LP_HBP_ENABLE
DSI_LP_VACT_DISABLE
DSI_LP_VACT_ENABLE
DSI_LP_VFP_DISABLE
DSI_LP_VFP_ENABLE
DSI_LP_VBP_DISABLE
DSI_LP_VBP_ENABLE
DSI_LP_VSYNC_DISABLE
DSI_LP_VSYNC_ENABLE
DSI_FBTAA_DISABLE
DSI_FBTAA_ENABLE
DSI_TE_EXTERNAL
DSI_TE_RISING_EDGE
DSI_TE_FALLING_EDGE
DSI_VSYNC_FALLING
DSI_VSYNC_RISING
DSI_AR_DISABLE
DSI_AR_ENABLE
DSI_TE_ACKNOWLEDGE_DISABLE
DSI_TE_ACKNOWLEDGE_ENABLE
DSI_ACKNOWLEDGE_DISABLE
DSI_ACKNOWLEDGE_ENABLE
DSI_LP_GSW0P_DISABLE
DSI_LP_GSW0P_ENABLE
DSI_LP_GSW1P_DISABLE
DSI_LP_GSW1P_ENABLE
DSI_LP_GSW2P_DISABLE
DSI_LP_GSW2P_ENABLE
DSI_LP_GSR0P_DISABLE
DSI_LP_GSR0P_ENABLE
DSI_LP_GSR1P_DISABLE
DSI_LP_GSR1P_ENABLE
DSI_LP_GSR2P_DISABLE
DSI_LP_GSR2P_ENABLE
DSI_LP_GLW_DISABLE
DSI_LP_GLW_ENABLE
DSI_LP_DSW0P_DISABLE
DSI_LP_DSW0P_ENABLE
DSI_LP_DSW1P_DISABLE
DSI_LP_DSW1P_ENABLE
DSI_LP_DSR0P_DISABLE
DSI_LP_DSR0P_ENABLE
DSI_LP_DLW_DISABLE
DSI_LP_DLW_ENABLE
DSI_LP_MRDP_DISABLE
DSI_LP_MRDP_ENABLE
DSI_HS_PM_DISABLE
DSI_HS_PM_ENABLE
DSI_AUTO_CLK_LANE_CTRL_DISABLE
DSI_AUTO_CLK_LANE_CTRL_ENABLE
DSI_ONE_DATA_LANE
DSI_TWO_DATA_LANES
DSI_FLOW_CONTROL_CRC_RX
DSI_FLOW_CONTROL_ECC_RX
DSI_FLOW_CONTROL_BTA
DSI_FLOW_CONTROL_EOTP_RX
DSI_FLOW_CONTROL_EOTP_TX
DSI_FLOW_CONTROL_ALL
DSI_RGB565

The values 0x00000001 and 0x00000002 can also be used for the RGB565 color mode configuration

DSI_RGB666

The value 0x00000004 can also be used for the RGB666 color mode configuration

DSI_RGB888
DSI_LOOSELY_PACKED_ENABLE
DSI_LOOSELY_PACKED_DISABLE
DSI_HSYNC_ACTIVE_HIGH
DSI_HSYNC_ACTIVE_LOW
DSI_VSYNC_ACTIVE_HIGH
DSI_VSYNC_ACTIVE_LOW
DSI_DATA_ENABLE_ACTIVE_HIGH
DSI_DATA_ENABLE_ACTIVE_LOW
DSI_PLL_IN_DIV1
DSI_PLL_IN_DIV2
DSI_PLL_IN_DIV3
DSI_PLL_IN_DIV4
DSI_PLL_IN_DIV5
DSI_PLL_IN_DIV6
DSI_PLL_IN_DIV7
DSI_PLL_OUT_DIV1
DSI_PLL_OUT_DIV2
DSI_PLL_OUT_DIV4
DSI_PLL_OUT_DIV8
DSI_FLAG_TE
DSI_FLAG_ER
DSI_FLAG_BUSY
DSI_FLAG_PLLLS
DSI_FLAG_PLLL
DSI_FLAG_PLLU
DSI_FLAG_RRS
DSI_FLAG_RR
DSI_IT_TE
DSI_IT_ER
DSI_IT_PLLL
DSI_IT_PLLU
DSI_IT_RR
DSI_DCS_SHORT_PKT_WRITE_P0

DCS short write, no parameters

DSI_DCS_SHORT_PKT_WRITE_P1

DCS short write, one parameter

DSI_GEN_SHORT_PKT_WRITE_P0

Generic short write, no parameters

DSI_GEN_SHORT_PKT_WRITE_P1

Generic short write, one parameter

DSI_GEN_SHORT_PKT_WRITE_P2

Generic short write, two parameters

DSI_DCS_LONG_PKT_WRITE

DCS long write

DSI_GEN_LONG_PKT_WRITE

Generic long write

DSI_DCS_SHORT_PKT_READ

DCS short read

DSI_GEN_SHORT_PKT_READ_P0

Generic short read, no parameters

DSI_GEN_SHORT_PKT_READ_P1

Generic short read, one parameter

DSI_GEN_SHORT_PKT_READ_P2

Generic short read, two parameters

HAL_DSI_ERROR_NONE
HAL_DSI_ERROR_ACK

acknowledge errors

HAL_DSI_ERROR_PHY

PHY related errors

HAL_DSI_ERROR_TX

transmission error

HAL_DSI_ERROR_RX

reception error

HAL_DSI_ERROR_ECC

ECC errors

HAL_DSI_ERROR_CRC

CRC error

HAL_DSI_ERROR_PSE

Packet Size error

HAL_DSI_ERROR_EOT

End Of Transmission error

HAL_DSI_ERROR_OVF

FIFO overflow error

HAL_DSI_ERROR_GEN

Generic FIFO related errors

DSI_CLOCK_LANE
DSI_DATA_LANES
DSI_SLEW_RATE_HSTX
DSI_SLEW_RATE_LPTX
DSI_HS_DELAY
DSI_SWAP_LANE_PINS
DSI_INVERT_HS_SIGNAL
DSI_CLK_LANE
DSI_DATA_LANE0
DSI_DATA_LANE1
DSI_TCLK_POST
DSI_TLPX_CLK
DSI_THS_EXIT
DSI_TLPX_DATA
DSI_THS_ZERO
DSI_THS_TRAIL
DSI_THS_PREPARE
DSI_TCLK_ZERO
DSI_TCLK_PREPARE
DSI_FREQ_96Mbps
DSI_FREQ_144Mbps
DSI_FREQ_168Mbps
DSI_FREQ_192Mbps
DSI_FREQ_240Mbps
DSI_FREQ_288Mbps
DSI_FREQ_336Mbps
DSI_FREQ_384Mbps
DSI_FREQ_480Mbps
DSI_FREQ_528Mbps
__HAL_DSI_ENABLE(__HANDLE__)

Enables the DSI host.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

__HAL_DSI_DISABLE(__HANDLE__)

Disables the DSI host.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

DSI_HOST_WRITE_FLAGS
__HAL_DSI_IS_WRITE_FINISH(__HANDLE__)
__HAL_DSI_IS_DLANE0_STOP(__HANDLE__)
__HAL_DSI_IS_CKLANE_STOP(__HANDLE__)
__HAL_DSI_IS_MASTER_STATE(__HANDLE__)
__HAL_DSI_IS_DBI_INF_DELAY(__HANDLE__, DELAY)
__HAL_DSI_PHY_ENABLE(__HANDLE__)

Enables the DSI PHY.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

__HAL_DSI_PHY_DISABLE(__HANDLE__)

Disable the DSI PHY.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

__HAL_DSI_PLL_ENABLE(__HANDLE__)

Enables the DSI PLL.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

__HAL_DSI_PLL_DISABLE(__HANDLE__)

Disables the DSI PLL.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

__HAL_DSI_ANA_ENABLE(__HANDLE__)

Enables the DSI analog power.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

__HAL_DSI_ANA_DISABLE(__HANDLE__)

Disables the DSI analog power.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

HAL_DSI_IS_VIDEO_MODE(__HANDLE__)

DSI in video mode.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

HAL_DSI_VIDEO_MODE_ENABLE(__HANDLE__)

Enable DSI video mode.

参数:
  • __HANDLE__ – DSI handle

返回值:

None.

__HAL_DSI_GET_FLAG(__HANDLE__, __FLAG__)
__HAL_DSI_CLEAR_FLAG(__HANDLE__, __FLAG__)
__HAL_DSI_ENABLE_IT(__HANDLE__, __INTERRUPT__)
__HAL_DSI_DISABLE_IT(__HANDLE__, __INTERRUPT__)
__HAL_DSI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
DSI_MAX_RETURN_PKT_SIZE

Maximum return packet configuration

IS_DSI_PLL_NDIV(NDIV)
IS_DSI_PLL_IDF(IDF)
IS_DSI_PLL_ODF(ODF)
IS_DSI_AUTO_CLKLANE_CONTROL(AutoClkLane)
IS_DSI_NUMBER_OF_LANES(NumberOfLanes)
IS_DSI_FLOW_CONTROL(FlowControl)
IS_DSI_COLOR_CODING(ColorCoding)
IS_DSI_LOOSELY_PACKED(LooselyPacked)
IS_DSI_DE_POLARITY(DataEnable)
IS_DSI_VSYNC_POLARITY(VSYNC)
IS_DSI_HSYNC_POLARITY(HSYNC)
IS_DSI_VIDEO_MODE_TYPE(VideoModeType)
IS_DSI_COLOR_MODE(ColorMode)
IS_DSI_SHUT_DOWN(ShutDown)
IS_DSI_LP_COMMAND(LPCommand)
IS_DSI_LP_HFP(LPHFP)
IS_DSI_LP_HBP(LPHBP)
IS_DSI_LP_VACTIVE(LPVActive)
IS_DSI_LP_VFP(LPVFP)
IS_DSI_LP_VBP(LPVBP)
IS_DSI_LP_VSYNC(LPVSYNC)
IS_DSI_FBTAA(FrameBTAAcknowledge)
IS_DSI_TE_SOURCE(TESource)
IS_DSI_TE_POLARITY(TEPolarity)
IS_DSI_AUTOMATIC_REFRESH(AutomaticRefresh)
IS_DSI_VS_POLARITY(VSPolarity)
IS_DSI_TE_ACK_REQUEST(TEAcknowledgeRequest)
IS_DSI_ACK_REQUEST(AcknowledgeRequest)
IS_DSI_LP_GSW0P(LP_GSW0P)
IS_DSI_LP_GSW1P(LP_GSW1P)
IS_DSI_LP_GSW2P(LP_GSW2P)
IS_DSI_LP_GSR0P(LP_GSR0P)
IS_DSI_LP_GSR1P(LP_GSR1P)
IS_DSI_LP_GSR2P(LP_GSR2P)
IS_DSI_LP_GLW(LP_GLW)
IS_DSI_LP_DSW0P(LP_DSW0P)
IS_DSI_LP_DSW1P(LP_DSW1P)
IS_DSI_LP_DSR0P(LP_DSR0P)
IS_DSI_LP_DLW(LP_DLW)
IS_DSI_LP_MRDP(LP_MRDP)
IS_DSI_SHORT_WRITE_PACKET_TYPE(MODE)
IS_DSI_LONG_WRITE_PACKET_TYPE(MODE)
IS_DSI_READ_PACKET_TYPE(MODE)
IS_DSI_COMMUNICATION_DELAY(CommDelay)
IS_DSI_LANE_GROUP(Lane)
IS_DSI_CUSTOM_LANE(CustomLane)
IS_DSI_LANE(Lane)
IS_DSI_PHY_TIMING(Timing)

Enums

enum HAL_DSI_StateTypeDef

DSI States Structure definition.

Values:

enumerator HAL_DSI_STATE_RESET
enumerator HAL_DSI_STATE_READY
enumerator HAL_DSI_STATE_ERROR
enumerator HAL_DSI_STATE_BUSY
enumerator HAL_DSI_STATE_TIMEOUT

Functions

HAL_StatusTypeDef HAL_DSI_Init(DSI_HandleTypeDef *hdsi)

Initializes the DSI according to the specified parameters in the DSI_InitTypeDef and create the associated handle.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_DeInit(DSI_HandleTypeDef *hdsi)

De-initializes the DSI peripheral registers to their default reset values.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

void HAL_DSI_MspInit(DSI_HandleTypeDef *hdsi)

Initializes the DSI MSP.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

None

void HAL_DSI_MspDeInit(DSI_HandleTypeDef *hdsi)

De-initializes the DSI MSP.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

None

void HAL_DSI_IRQHandler(DSI_HandleTypeDef *hdsi)

Handles DSI interrupt request.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

void HAL_DSI_TearingEffectCallback(DSI_HandleTypeDef *hdsi)

Tearing Effect DSI callback.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

None

void HAL_DSI_EndOfRefreshCallback(DSI_HandleTypeDef *hdsi)

End of Refresh DSI callback.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

None

void HAL_DSI_ErrorCallback(DSI_HandleTypeDef *hdsi)

Operation Error DSI callback.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

None

HAL_StatusTypeDef HAL_DSI_SetGenericVCID(DSI_HandleTypeDef *hdsi, uint32_t VirtualChannelID)

Configure the Generic interface read-back Virtual Channel ID.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • VirtualChannelID – Virtual channel ID

返回值:

HAL – status

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.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • CmdCfg – pointer to a DSI_CmdCfgTypeDef structure that contains the DSI command mode configuration parameters

返回值:

HAL – status

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.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • LPCmd – pointer to a DSI_LPCmdTypeDef structure that contains the DSI command transmission mode configuration parameters

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_ConfigFlowControl(DSI_HandleTypeDef *hdsi, uint32_t FlowControl)

Configure the flow control parameters.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • FlowControl – flow control feature(s) to be enabled. This parameter can be any combination of DSI Flow Control.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_ConfigPhyTimer(DSI_HandleTypeDef *hdsi, DSI_PHY_TimerTypeDef *PhyTimers)

Configure the DSI PHY timer parameters.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • PhyTimersDSI_PHY_TimerTypeDef structure that contains the DSI PHY timing parameters

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_ConfigHostTimeouts(DSI_HandleTypeDef *hdsi, DSI_HOST_TimeoutTypeDef *HostTimeouts)

Configure the DSI HOST timeout parameters.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • HostTimeoutsDSI_HOST_TimeoutTypeDef structure that contains the DSI host timeout parameters

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_ConfigPhyFreq(DSI_HandleTypeDef *hdsi, uint32_t freq)

Configure the DSI PHY frequency.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • freq – DSI frequency.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_SetPaticalSend(DSI_HandleTypeDef *hdsi, uint32_t write_size)

Set patial write buffer bytes.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • write_size – - framebuffer bytes

返回:

HAL_StatusTypeDef HAL_DSI_DirectSend(DSI_HandleTypeDef *hdsi, uint32_t write_size)

Set direct write buffer bytes.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • write_size – - framebuffer bytes

返回:

HAL_StatusTypeDef HAL_DSI_Start(DSI_HandleTypeDef *hdsi)

Start the DSI module.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_bypass_output(DSI_HandleTypeDef *hdsi, bool bypass)

Bypass all lane output on bus.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • bypass – 1: bypass enabled, 0: bypass disabled.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_Stop(DSI_HandleTypeDef *hdsi)

Stop the DSI module.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

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

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • ChannelID – Virtual channel ID.

  • Mode – DSI short packet data type. This parameter can be any value of DSI SHORT WRITE PKT Data Type.

  • Param1 – DSC command or first generic parameter. This parameter can be any value of DSI DCS Command or a generic command code.

  • Param2 – DSC parameter or second generic parameter.

返回值:

HAL – status

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

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • ChannelID – Virtual channel ID.

  • Mode – DSI long packet data type. This parameter can be any value of DSI LONG WRITE PKT Data Type.

  • NbParams – Number of parameters.

  • Param1 – DSC command or first generic parameter. This parameter can be any value of DSI DCS Command or a generic command code

  • ParametersTable – Pointer to parameter values table.

返回值:

HAL – status

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)

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • ChannelNbr – Virtual channel ID

  • Array – pointer to a buffer to store the payload of a read back operation.

  • Size – Data size to be read (in byte).

  • Mode – DSI read packet data type. This parameter can be any value of DSI SHORT READ PKT Data Type.

  • DCSCmd – DCS get/read command.

  • ParametersTable – Pointer to parameter values table.

返回值:

HAL – status

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)

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

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)

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

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)

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

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)

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_ConfigErrorMonitor(DSI_HandleTypeDef *hdsi, uint32_t ActiveErrors)

Enable the error monitor flags.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

  • ActiveErrors – indicates which error interrupts will be enabled. This parameter can be any combination of DSI Error Data Type.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_EnterCKLaneHSM(DSI_HandleTypeDef *hdsi)

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

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

HAL_StatusTypeDef HAL_DSI_ExitCKLaneHSM(DSI_HandleTypeDef *hdsi)

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

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status

uint8_t HAL_DSI_IsBusy(DSI_HandleTypeDef *hdsi)

Check DSI is busy.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – status, TRUE if during BTA, or reading, writting

HAL_DSI_StateTypeDef HAL_DSI_GetState(DSI_HandleTypeDef *hdsi)

Return the DSI state.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

HAL – state

uint32_t HAL_DSI_GetError(DSI_HandleTypeDef *hdsi)

Return the DSI error code.

参数:
  • hdsi – pointer to a DSI_HandleTypeDef structure that contains the configuration information for the DSI.

返回值:

DSI – Error Code

void HAL_DSI_ForceEnableAck(void)
uint8_t HAL_DSI_ISForceEnableAck(void)
struct DSI_InitTypeDef
#include <bf0_hal_dsi.h>

DSI Init Structure definition.

Public Members

uint32_t AutomaticClockLaneControl

Automatic clock lane control This parameter can be any value of DSI Automatic Clk Lane Control

uint32_t TXEscapeCkdiv

TX Escape clock division The values 0 and 1 stop the TX_ESC clock generation

uint32_t NumberOfLanes

Number of lanes This parameter can be any value of DSI Number Of Lanes

struct DSI_DLLInitTypeDef
#include <bf0_hal_dsi.h>

DSI DLL Clock structure definition.

Public Members

uint32_t STG
uint32_t output_div
struct DSI_VidCfgTypeDef
#include <bf0_hal_dsi.h>

DSI Video mode configuration.

Public Members

uint32_t VirtualChannelID

Virtual channel ID

uint32_t ColorCoding

Color coding for LTDC interface This parameter can be any value of DSI Color Coding

uint32_t LooselyPacked

Enable or disable loosely packed stream (needed only when using 18-bit configuration). This parameter can be any value of DSI Loosely Packed

uint32_t Mode

Video mode type This parameter can be any value of DSI Video Mode Type

uint32_t PacketSize

Video packet size

uint32_t NumberOfChunks

Number of chunks

uint32_t NullPacketSize

Null packet size

uint32_t HSPolarity

HSYNC pin polarity This parameter can be any value of DSI HSYNC Polarity

uint32_t VSPolarity

VSYNC pin polarity This parameter can be any value of DSI VSYNC Active Polarity

uint32_t DEPolarity

Data Enable pin polarity This parameter can be any value of DSI DATA ENABLE Polarity

uint32_t HorizontalSyncActive

Horizontal synchronism active duration (in lane byte clock cycles)

uint32_t HorizontalBackPorch

Horizontal back-porch duration (in lane byte clock cycles)

uint32_t HorizontalLine

Horizontal line duration (in lane byte clock cycles)

uint32_t VerticalSyncActive

Vertical synchronism active duration

uint32_t VerticalBackPorch

Vertical back-porch duration

uint32_t VerticalFrontPorch

Vertical front-porch duration

uint32_t VerticalActive

Vertical active duration

uint32_t LPCommandEnable

Low-power command enable This parameter can be any value of DSI LP Command

uint32_t LPLargestPacketSize

The size, in bytes, of the low power largest packet that can fit in a line during VSA, VBP and VFP regions

uint32_t LPVACTLargestPacketSize

The size, in bytes, of the low power largest packet that can fit in a line during VACT region

uint32_t LPHorizontalFrontPorchEnable

Low-power horizontal front-porch enable This parameter can be any value of DSI LP HFP

uint32_t LPHorizontalBackPorchEnable

Low-power horizontal back-porch enable This parameter can be any value of DSI LP HBP

uint32_t LPVerticalActiveEnable

Low-power vertical active enable This parameter can be any value of DSI LP VACT

uint32_t LPVerticalFrontPorchEnable

Low-power vertical front-porch enable This parameter can be any value of DSI LP VFP

uint32_t LPVerticalBackPorchEnable

Low-power vertical back-porch enable This parameter can be any value of DSI LP VBP

uint32_t LPVerticalSyncActiveEnable

Low-power vertical sync active enable This parameter can be any value of DSI LP VSYNC

uint32_t FrameBTAAcknowledgeEnable

Frame bus-turn-around acknowledge enable This parameter can be any value of DSI FBTA Acknowledge

struct DSI_CmdCfgTypeDef
#include <bf0_hal_dsi.h>

DSI Adapted command mode configuration.

Public Members

uint32_t VirtualChannelID

Virtual channel ID

uint32_t ColorCoding

Color coding for LTDC interface This parameter can be any value of DSI Color Coding

uint32_t CommandSize

Maximum allowed size for an LTDC write memory command, measured in pixels. This parameter can be any value between 0x00 and 0xFFFFU

uint32_t TearingEffectSource

Tearing effect source This parameter can be any value of DSI Tearing Effect Source

uint32_t TearingEffectPolarity

Tearing effect pin polarity This parameter can be any value of DSI Tearing Effect Polarity

uint32_t HSPolarity

HSYNC pin polarity This parameter can be any value of DSI HSYNC Polarity

uint32_t VSPolarity

VSYNC pin polarity This parameter can be any value of DSI VSYNC Active Polarity

uint32_t DEPolarity

Data Enable pin polarity This parameter can be any value of DSI DATA ENABLE Polarity

uint32_t VSyncPol

VSync edge on which the LTDC is halted This parameter can be any value of DSI Vsync Polarity

uint32_t AutomaticRefresh

Automatic refresh mode This parameter can be any value of DSI Automatic Refresh

uint32_t TEAcknowledgeRequest

Tearing Effect Acknowledge Request Enable This parameter can be any value of DSI TE Acknowledge Request

struct DSI_LPCmdTypeDef
#include <bf0_hal_dsi.h>

DSI command transmission mode configuration.

Public Members

uint32_t LPGenShortWriteNoP

Generic Short Write Zero parameters Transmission This parameter can be any value of DSI LP LPGen Short Write NoP

uint32_t LPGenShortWriteOneP

Generic Short Write One parameter Transmission This parameter can be any value of DSI LP LPGen Short Write OneP

uint32_t LPGenShortWriteTwoP

Generic Short Write Two parameters Transmission This parameter can be any value of DSI LP LPGen Short Write TwoP

uint32_t LPGenShortReadNoP

Generic Short Read Zero parameters Transmission This parameter can be any value of DSI LP LPGen Short Read NoP

uint32_t LPGenShortReadOneP

Generic Short Read One parameter Transmission This parameter can be any value of DSI LP LPGen Short Read OneP

uint32_t LPGenShortReadTwoP

Generic Short Read Two parameters Transmission This parameter can be any value of DSI LP LPGen Short Read TwoP

uint32_t LPGenLongWrite

Generic Long Write Transmission This parameter can be any value of DSI LP LPGen LongWrite

uint32_t LPDcsShortWriteNoP

DCS Short Write Zero parameters Transmission This parameter can be any value of DSI LP LPDcs Short Write NoP

uint32_t LPDcsShortWriteOneP

DCS Short Write One parameter Transmission This parameter can be any value of DSI LP LPDcs Short Write OneP

uint32_t LPDcsShortReadNoP

DCS Short Read Zero parameters Transmission This parameter can be any value of DSI LP LPDcs Short Read NoP

uint32_t LPDcsLongWrite

DCS Long Write Transmission This parameter can be any value of DSI LP LPDcs Long Write

uint32_t LPMaxReadPacket

Maximum Read Packet Size Transmission This parameter can be any value of DSI LP LPMax Read Packet

uint32_t AcknowledgeRequest

Acknowledge Request Enable This parameter can be any value of DSI Acknowledge Request

struct DSI_PHY_TimerTypeDef
#include <bf0_hal_dsi.h>

DSI PHY Timings definition.

Public Members

uint32_t ClockLaneHS2LPTime

The maximum time that the D-PHY clock lane takes to go from high-speed to low-power transmission

uint32_t ClockLaneLP2HSTime

The maximum time that the D-PHY clock lane takes to go from low-power to high-speed transmission

uint32_t DataLaneHS2LPTime

The maximum time that the D-PHY data lanes takes to go from high-speed to low-power transmission

uint32_t DataLaneLP2HSTime

The maximum time that the D-PHY data lanes takes to go from low-power to high-speed transmission

uint32_t DataLaneMaxReadTime

The maximum time required to perform a read command

uint32_t StopWaitTime

The minimum wait period to request a High-Speed transmission after the Stop state

struct DSI_HOST_TimeoutTypeDef
#include <bf0_hal_dsi.h>

DSI HOST Timeouts definition.

Public Members

uint32_t TimeoutCkdiv

Time-out clock division

uint32_t HighSpeedTransmissionTimeout

High-speed transmission time-out

uint32_t LowPowerReceptionTimeout

Low-power reception time-out

uint32_t HighSpeedReadTimeout

High-speed read time-out

uint32_t LowPowerReadTimeout

Low-power read time-out

uint32_t HighSpeedWriteTimeout

High-speed write time-out

uint32_t LowPowerWriteTimeout

Low-speed write time-out

uint32_t BTATimeout

BTA time-out

struct DSI_HandleTypeDef
#include <bf0_hal_dsi.h>

DSI Handle Structure definition.

Public Members

DSI_HOST_TypeDef *Instance

Host register base address

DSI_PHY_TypeDef *PHY_Instance

PHY register base address

DSI_InitTypeDef Init

DSI required parameters

HAL_LockTypeDef Lock

DSI peripheral status

HAL_DSI_StateTypeDef State

DSI communication state

uint32_t ErrorCode

DSI Error code

uint32_t ErrorMsk

DSI Error monitoring mask