![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
The MIPI DSI driver supports both video mode and command mode. More...
For both modes, first call DSI_Init and DSI_InitDphy to initialize the module and enable the D-PHY. The DSI driver provides function DSI_GetDphyDefaultConfig to help with the D-PHY timing parameter calculation. With the input txHsBitClk frequency and txEscClk frequency, the function can generate the timing parameters based on the D-PHY specification. The user can use the parameter directly, or change them according to the special device.
For the command mode, DSI driver provides polling method and interrupt method for the data transfer. At the same time, there are also small functional APIs so that user can construct them for their special purpose.
When the peripheral is configured through command mode, the video mode can be started by DSI_SetDpiConfig.
DSI driver provides polling method and interrupt method for the command mode data transfer, they are DSI_TransferBlocking and DSI_TransferNonBlocking. The transfer is specified by the structure dsi_transfer_t.
There are two ways to construct the dsi_transfer_t.
sendDscCmd
is set to false, the dscCmd
is not used.dscCmd
. In this case, the parameter sendDscCmd
is set to true, the dscCmd
is the DSC command to send. The TX data array is sent after dscCmd
.There is an example that send DSC command set_column_address (0x2A). The two methods are actually the same.
Method 1: Include DSC command in TX data array.
Method 2: Don't include DSC command in TX data array.
Data Structures | |
struct | MIPI_DSI_Type |
MIPI DSI structure definition. More... | |
struct | _dsi_config |
MIPI DSI controller configuration. More... | |
struct | _dsi_dpi_config |
MIPI DSI controller DPI interface configuration. More... | |
struct | _dsi_dphy_config |
MIPI DSI D-PHY configuration. More... | |
struct | _dsi_transfer |
Structure for the data transfer. More... | |
struct | _dsi_handle |
MIPI DSI transfer handle structure. More... | |
Typedefs | |
typedef struct _dsi_config | dsi_config_t |
MIPI DSI controller configuration. More... | |
typedef enum _dsi_dpi_color_coding | dsi_dpi_color_coding_t |
MIPI DPI interface color coding. More... | |
typedef enum _dsi_dpi_pixel_packet | dsi_dpi_pixel_packet_t |
MIPI DSI pixel packet type send through DPI interface. More... | |
typedef enum _dsi_dpi_video_mode | dsi_dpi_video_mode_t |
DPI video mode. More... | |
typedef enum _dsi_dpi_bllp_mode | dsi_dpi_bllp_mode_t |
Behavior in BLLP (Blanking or Low-Power Interval). More... | |
typedef struct _dsi_dpi_config | dsi_dpi_config_t |
MIPI DSI controller DPI interface configuration. More... | |
typedef struct _dsi_dphy_config | dsi_dphy_config_t |
MIPI DSI D-PHY configuration. More... | |
typedef enum _dsi_tx_data_type | dsi_tx_data_type_t |
DSI TX data type. More... | |
typedef enum _dsi_rx_data_type | dsi_rx_data_type_t |
DSI RX data type. More... | |
typedef struct _dsi_transfer | dsi_transfer_t |
Structure for the data transfer. More... | |
typedef struct _dsi_handle | dsi_handle_t |
MIPI DSI transfer handle. More... | |
typedef void(* | dsi_callback_t )(const MIPI_DSI_Type *base, dsi_handle_t *handle, status_t status, void *userData) |
MIPI DSI callback for finished transfer. More... | |
Driver version | |
#define | FSL_MIPI_DSI_DRIVER_VERSION (MAKE_VERSION(2, 2, 4)) |
MIPI_DSI host initialization. | |
void | DSI_Init (const MIPI_DSI_Type *base, const dsi_config_t *config) |
Initializes an MIPI DSI host with the user configuration. More... | |
void | DSI_Deinit (const MIPI_DSI_Type *base) |
Deinitializes an MIPI DSI host. More... | |
void | DSI_GetDefaultConfig (dsi_config_t *config) |
Get the default configuration to initialize the MIPI DSI host. More... | |
DPI interface | |
void | DSI_SetDpiConfig (const MIPI_DSI_Type *base, const dsi_dpi_config_t *config, uint8_t numLanes, uint32_t dpiPixelClkFreq_Hz, uint32_t dsiHsBitClkFreq_Hz) |
Configure the DPI interface core. More... | |
D-PHY configuration. | |
uint32_t | DSI_InitDphy (const MIPI_DSI_Type *base, const dsi_dphy_config_t *config, uint32_t refClkFreq_Hz) |
Initializes the D-PHY. More... | |
void | DSI_DeinitDphy (const MIPI_DSI_Type *base) |
Deinitializes the D-PHY. More... | |
void | DSI_GetDphyDefaultConfig (dsi_dphy_config_t *config, uint32_t txHsBitClk_Hz, uint32_t txEscClk_Hz) |
Get the default D-PHY configuration. More... | |
Interrupts | |
static void | DSI_EnableInterrupts (const MIPI_DSI_Type *base, uint32_t intGroup1, uint32_t intGroup2) |
Enable the interrupts. More... | |
static void | DSI_DisableInterrupts (const MIPI_DSI_Type *base, uint32_t intGroup1, uint32_t intGroup2) |
Disable the interrupts. More... | |
static void | DSI_GetAndClearInterruptStatus (const MIPI_DSI_Type *base, uint32_t *intGroup1, uint32_t *intGroup2) |
Get and clear the interrupt status. More... | |
MIPI DSI APB | |
void | DSI_SetApbPacketControl (const MIPI_DSI_Type *base, uint16_t wordCount, uint8_t virtualChannel, dsi_tx_data_type_t dataType, uint8_t flags) |
Configure the APB packet to send. More... | |
void | DSI_WriteApbTxPayload (const MIPI_DSI_Type *base, const uint8_t *payload, uint16_t payloadSize) |
Fill the long APB packet payload. More... | |
void | DSI_WriteApbTxPayloadExt (const MIPI_DSI_Type *base, const uint8_t *payload, uint16_t payloadSize, bool sendDscCmd, uint8_t dscCmd) |
Extended function to fill the payload to TX FIFO. More... | |
void | DSI_ReadApbRxPayload (const MIPI_DSI_Type *base, uint8_t *payload, uint16_t payloadSize) |
Read the long APB packet payload. More... | |
static void | DSI_SendApbPacket (const MIPI_DSI_Type *base) |
Trigger the controller to send out APB packet. More... | |
static uint32_t | DSI_GetApbStatus (const MIPI_DSI_Type *base) |
Get the APB status. More... | |
static uint32_t | DSI_GetRxErrorStatus (const MIPI_DSI_Type *base) |
Get the error status during data transfer. More... | |
static uint8_t | DSI_GetEccRxErrorPosition (uint32_t rxErrorStatus) |
Get the one-bit RX ECC error position. More... | |
static uint32_t | DSI_GetAndClearHostStatus (const MIPI_DSI_Type *base) |
Get and clear the DSI host status. More... | |
static uint32_t | DSI_GetRxPacketHeader (const MIPI_DSI_Type *base) |
Get the RX packet header. More... | |
static dsi_rx_data_type_t | DSI_GetRxPacketType (uint32_t rxPktHeader) |
Extract the RX packet type from the packet header. More... | |
static uint16_t | DSI_GetRxPacketWordCount (uint32_t rxPktHeader) |
Extract the RX packet word count from the packet header. More... | |
static uint8_t | DSI_GetRxPacketVirtualChannel (uint32_t rxPktHeader) |
Extract the RX packet virtual channel from the packet header. More... | |
status_t | DSI_TransferBlocking (const MIPI_DSI_Type *base, dsi_transfer_t *xfer) |
APB data transfer using blocking method. More... | |
Transactional | |
status_t | DSI_TransferCreateHandle (const MIPI_DSI_Type *base, dsi_handle_t *handle, dsi_callback_t callback, void *userData) |
Create the MIPI DSI handle. More... | |
status_t | DSI_TransferNonBlocking (const MIPI_DSI_Type *base, dsi_handle_t *handle, dsi_transfer_t *xfer) |
APB data transfer using interrupt method. More... | |
void | DSI_TransferAbort (const MIPI_DSI_Type *base, dsi_handle_t *handle) |
Abort current APB data transfer. More... | |
void | DSI_TransferHandleIRQ (const MIPI_DSI_Type *base, dsi_handle_t *handle) |
Interrupt handler for the DSI. More... | |
struct MIPI_DSI_Type |
Data Fields | |
DSI_HOST_Type * | host |
Pointer to HOST registers. More... | |
DSI_HOST_APB_PKT_IF_Type * | apb |
Pointer to APB registers. More... | |
DSI_HOST_DPI_INTFC_Type * | dpi |
Pointer to DPI registers. More... | |
DSI_HOST_NXP_FDSOI28_DPHY_INTFC_Type * | dphy |
Pointer to DPHY registers. More... | |
DSI_HOST_Type* MIPI_DSI_Type::host |
DSI_HOST_APB_PKT_IF_Type* MIPI_DSI_Type::apb |
DSI_HOST_DPI_INTFC_Type* MIPI_DSI_Type::dpi |
DSI_HOST_NXP_FDSOI28_DPHY_INTFC_Type* MIPI_DSI_Type::dphy |
struct _dsi_config |
Data Fields | |
uint8_t | numLanes |
Number of lanes. More... | |
bool | enableNonContinuousHsClk |
In enabled, the high speed clock will enter low power mode between transmissions. More... | |
bool | enableTxUlps |
Enable the TX ULPS. More... | |
bool | autoInsertEoTp |
Insert an EoTp short package when switching from HS to LP. More... | |
uint8_t | numExtraEoTp |
How many extra EoTp to send after the end of a packet. More... | |
uint32_t | htxTo_ByteClk |
HS TX timeout count (HTX_TO) in byte clock. More... | |
uint32_t | lrxHostTo_ByteClk |
LP RX host timeout count (LRX-H_TO) in byte clock. More... | |
uint32_t | btaTo_ByteClk |
Bus turn around timeout count (TA_TO) in byte clock. More... | |
uint8_t _dsi_config::numLanes |
bool _dsi_config::enableNonContinuousHsClk |
bool _dsi_config::enableTxUlps |
bool _dsi_config::autoInsertEoTp |
uint8_t _dsi_config::numExtraEoTp |
uint32_t _dsi_config::htxTo_ByteClk |
uint32_t _dsi_config::lrxHostTo_ByteClk |
uint32_t _dsi_config::btaTo_ByteClk |
struct _dsi_dpi_config |
Data Fields | |
uint16_t | pixelPayloadSize |
Maximum number of pixels that should be sent as one DSI packet. More... | |
dsi_dpi_color_coding_t | dpiColorCoding |
DPI color coding. More... | |
dsi_dpi_pixel_packet_t | pixelPacket |
Pixel packet format. More... | |
dsi_dpi_video_mode_t | videoMode |
Video mode. More... | |
dsi_dpi_bllp_mode_t | bllpMode |
Behavior in BLLP. More... | |
uint8_t | polarityFlags |
OR'ed value of _dsi_dpi_polarity_flag controls signal polarity. More... | |
uint16_t | hfp |
Horizontal front porch, in dpi pixel clock. More... | |
uint16_t | hbp |
Horizontal back porch, in dpi pixel clock. More... | |
uint16_t | hsw |
Horizontal sync width, in dpi pixel clock. More... | |
uint8_t | vfp |
Number of lines in vertical front porch. More... | |
uint8_t | vbp |
Number of lines in vertical back porch. More... | |
uint16_t | panelHeight |
Line number in vertical active area. More... | |
uint8_t | virtualChannel |
Virtual channel. More... | |
uint16_t _dsi_dpi_config::pixelPayloadSize |
Recommended that the line size (in pixels) is evenly divisible by this parameter.
dsi_dpi_color_coding_t _dsi_dpi_config::dpiColorCoding |
dsi_dpi_pixel_packet_t _dsi_dpi_config::pixelPacket |
dsi_dpi_video_mode_t _dsi_dpi_config::videoMode |
dsi_dpi_bllp_mode_t _dsi_dpi_config::bllpMode |
uint8_t _dsi_dpi_config::polarityFlags |
uint16_t _dsi_dpi_config::hfp |
uint16_t _dsi_dpi_config::hbp |
uint16_t _dsi_dpi_config::hsw |
uint8_t _dsi_dpi_config::vfp |
uint8_t _dsi_dpi_config::vbp |
uint16_t _dsi_dpi_config::panelHeight |
uint8_t _dsi_dpi_config::virtualChannel |
struct _dsi_dphy_config |
Data Fields | |
uint32_t | txHsBitClk_Hz |
The generated HS TX bit clock in Hz. More... | |
uint8_t | tClkPre_ByteClk |
TLPX + TCLK-PREPARE + TCLK-ZERO + TCLK-PRE in byte clock. More... | |
uint8_t | tClkPost_ByteClk |
TCLK-POST + T_CLK-TRAIL in byte clock. More... | |
uint8_t | tHsExit_ByteClk |
THS-EXIT in byte clock. More... | |
uint32_t | tWakeup_EscClk |
Number of clk_esc clock periods to keep a clock or data lane in Mark-1 state after exiting ULPS. More... | |
uint8_t | tHsPrepare_HalfEscClk |
THS-PREPARE in clk_esc/2. More... | |
uint8_t | tClkPrepare_HalfEscClk |
TCLK-PREPARE in clk_esc/2. More... | |
uint8_t | tHsZero_ByteClk |
THS-ZERO in clk_byte. More... | |
uint8_t | tClkZero_ByteClk |
TCLK-ZERO in clk_byte. More... | |
uint8_t | tHsTrail_ByteClk |
THS-TRAIL + 4*UI in clk_byte. More... | |
uint8_t | tClkTrail_ByteClk |
TCLK-TRAIL + 4*UI in clk_byte. More... | |
uint32_t _dsi_dphy_config::txHsBitClk_Hz |
uint8_t _dsi_dphy_config::tClkPre_ByteClk |
Set how long the controller will wait after enabling clock lane for HS before enabling data lanes for HS.
uint8_t _dsi_dphy_config::tClkPost_ByteClk |
Set how long the controller will wait before putting clock lane into LP mode after data lanes detected in stop state.
uint8_t _dsi_dphy_config::tHsExit_ByteClk |
Set how long the controller will wait after the clock lane has been put into LP mode before enabling clock lane for HS again.
uint32_t _dsi_dphy_config::tWakeup_EscClk |
uint8_t _dsi_dphy_config::tHsPrepare_HalfEscClk |
Set how long to drive the LP-00 state before HS transmissions, available values are 2, 3, 4, 5.
uint8_t _dsi_dphy_config::tClkPrepare_HalfEscClk |
Set how long to drive the LP-00 state before HS transmissions, available values are 2, 3.
uint8_t _dsi_dphy_config::tHsZero_ByteClk |
Set how long that controller drives data lane HS-0 state before transmit the Sync sequence. Available values are 6, 7, ..., 37.
uint8_t _dsi_dphy_config::tClkZero_ByteClk |
Set how long that controller drives clock lane HS-0 state before transmit the Sync sequence. Available values are 3, 4, ..., 66.
uint8_t _dsi_dphy_config::tHsTrail_ByteClk |
Set the time of the flipped differential state after last payload data bit of HS transmission burst. Available values are 0, 1, ..., 15.
uint8_t _dsi_dphy_config::tClkTrail_ByteClk |
Set the time of the flipped differential state after last payload data bit of HS transmission burst. Available values are 0, 1, ..., 15.
struct _dsi_transfer |
Data Fields | |
uint8_t | virtualChannel |
Virtual channel. More... | |
dsi_tx_data_type_t | txDataType |
TX data type. More... | |
uint8_t | flags |
Flags to control the transfer, see _dsi_transfer_flags. More... | |
const uint8_t * | txData |
The TX data buffer. More... | |
uint8_t * | rxData |
The TX data buffer. More... | |
uint16_t | txDataSize |
Size of the TX data. More... | |
uint16_t | rxDataSize |
Size of the RX data. More... | |
bool | sendDscCmd |
If set to true, the DSC command is specified by dscCmd, otherwise the DSC command is included in the txData. More... | |
uint8_t | dscCmd |
The DSC command to send, only valid when sendDscCmd is true. More... | |
uint8_t _dsi_transfer::virtualChannel |
dsi_tx_data_type_t _dsi_transfer::txDataType |
uint8_t _dsi_transfer::flags |
const uint8_t* _dsi_transfer::txData |
uint8_t* _dsi_transfer::rxData |
uint16_t _dsi_transfer::txDataSize |
uint16_t _dsi_transfer::rxDataSize |
bool _dsi_transfer::sendDscCmd |
uint8_t _dsi_transfer::dscCmd |
struct _dsi_handle |
Data Fields | |
volatile bool | isBusy |
MIPI DSI is busy with APB data transfer. More... | |
dsi_transfer_t | xfer |
Transfer information. More... | |
dsi_callback_t | callback |
DSI callback. | |
void * | userData |
Callback parameter. | |
const MIPI_DSI_Type * | dsi |
Pointer to MIPI DSI peripheral. More... | |
volatile bool _dsi_handle::isBusy |
dsi_transfer_t _dsi_handle::xfer |
const MIPI_DSI_Type* _dsi_handle::dsi |
typedef struct _dsi_config dsi_config_t |
typedef enum _dsi_dpi_color_coding dsi_dpi_color_coding_t |
typedef enum _dsi_dpi_pixel_packet dsi_dpi_pixel_packet_t |
typedef enum _dsi_dpi_video_mode dsi_dpi_video_mode_t |
typedef enum _dsi_dpi_bllp_mode dsi_dpi_bllp_mode_t |
typedef struct _dsi_dpi_config dsi_dpi_config_t |
typedef struct _dsi_dphy_config dsi_dphy_config_t |
typedef enum _dsi_tx_data_type dsi_tx_data_type_t |
typedef enum _dsi_rx_data_type dsi_rx_data_type_t |
typedef struct _dsi_transfer dsi_transfer_t |
typedef struct _dsi_handle dsi_handle_t |
typedef void(* dsi_callback_t)(const MIPI_DSI_Type *base, dsi_handle_t *handle, status_t status, void *userData) |
When transfer finished, one of these status values will be passed to the user:
anonymous enum |
anonymous enum |
enum _dsi_dpi_video_mode |
enum _dsi_dpi_bllp_mode |
anonymous enum |
anonymous enum |
enum _dsi_host_status |
anonymous enum |
enum _dsi_tx_data_type |
enum _dsi_rx_data_type |
anonymous enum |
void DSI_Init | ( | const MIPI_DSI_Type * | base, |
const dsi_config_t * | config | ||
) |
This function initializes the MIPI DSI host with the configuration, it should be called first before other MIPI DSI driver functions.
base | MIPI DSI host peripheral base address. |
config | Pointer to a user-defined configuration structure. |
void DSI_Deinit | ( | const MIPI_DSI_Type * | base | ) |
This function should be called after all bother MIPI DSI driver functions.
base | MIPI DSI host peripheral base address. |
void DSI_GetDefaultConfig | ( | dsi_config_t * | config | ) |
The default value is:
config | Pointer to a user-defined configuration structure. |
void DSI_SetDpiConfig | ( | const MIPI_DSI_Type * | base, |
const dsi_dpi_config_t * | config, | ||
uint8_t | numLanes, | ||
uint32_t | dpiPixelClkFreq_Hz, | ||
uint32_t | dsiHsBitClkFreq_Hz | ||
) |
This function sets the DPI interface configuration, it should be used in video mode.
base | MIPI DSI host peripheral base address. |
config | Pointer to the DPI interface configuration. |
numLanes | Lane number, should be same with the setting in dsi_dpi_config_t. |
dpiPixelClkFreq_Hz | The DPI pixel clock frequency in Hz. |
dsiHsBitClkFreq_Hz | The DSI high speed bit clock frequency in Hz. It is the same with DPHY PLL output. |
uint32_t DSI_InitDphy | ( | const MIPI_DSI_Type * | base, |
const dsi_dphy_config_t * | config, | ||
uint32_t | refClkFreq_Hz | ||
) |
This function configures the D-PHY timing and setups the D-PHY PLL based on user configuration. The configuration structure could be got by the function DSI_GetDphyDefaultConfig.
For some platforms there is not dedicated D-PHY PLL, indicated by the macro FSL_FEATURE_MIPI_DSI_NO_DPHY_PLL. For these platforms, the refClkFreq_Hz
is useless.
base | MIPI DSI host peripheral base address. |
config | Pointer to the D-PHY configuration. |
refClkFreq_Hz | The REFCLK frequency in Hz. |
void DSI_DeinitDphy | ( | const MIPI_DSI_Type * | base | ) |
Power down the D-PHY PLL and shut down D-PHY.
base | MIPI DSI host peripheral base address. |
void DSI_GetDphyDefaultConfig | ( | dsi_dphy_config_t * | config, |
uint32_t | txHsBitClk_Hz, | ||
uint32_t | txEscClk_Hz | ||
) |
Gets the default D-PHY configuration, the timing parameters are set according to D-PHY specification. User could use the configuration directly, or change some parameters according to the special device.
config | Pointer to the D-PHY configuration. |
txHsBitClk_Hz | High speed bit clock in Hz. |
txEscClk_Hz | Esc clock in Hz. |
|
inlinestatic |
The interrupts to enable are passed in as OR'ed mask value of _dsi_interrupt.
base | MIPI DSI host peripheral base address. |
intGroup1 | Interrupts to enable in group 1. |
intGroup2 | Interrupts to enable in group 2. |
|
inlinestatic |
The interrupts to disable are passed in as OR'ed mask value of _dsi_interrupt.
base | MIPI DSI host peripheral base address. |
intGroup1 | Interrupts to disable in group 1. |
intGroup2 | Interrupts to disable in group 2. |
|
inlinestatic |
base | MIPI DSI host peripheral base address. |
intGroup1 | Group 1 interrupt status. |
intGroup2 | Group 2 interrupt status. |
void DSI_SetApbPacketControl | ( | const MIPI_DSI_Type * | base, |
uint16_t | wordCount, | ||
uint8_t | virtualChannel, | ||
dsi_tx_data_type_t | dataType, | ||
uint8_t | flags | ||
) |
This function configures the next APB packet transfer. After configuration, the packet transfer could be started with function DSI_SendApbPacket. If the packet is long packet, Use DSI_WriteApbTxPayload to fill the payload before start transfer.
base | MIPI DSI host peripheral base address. |
wordCount | For long packet, this is the byte count of the payload. For short packet, this is (data1 << 8) | data0. |
virtualChannel | Virtual channel. |
dataType | The packet data type, (DI). |
flags | The transfer control flags, see _dsi_transfer_flags. |
void DSI_WriteApbTxPayload | ( | const MIPI_DSI_Type * | base, |
const uint8_t * | payload, | ||
uint16_t | payloadSize | ||
) |
Write the long packet payload to TX FIFO.
base | MIPI DSI host peripheral base address. |
payload | Pointer to the payload. |
payloadSize | Payload size in byte. |
void DSI_WriteApbTxPayloadExt | ( | const MIPI_DSI_Type * | base, |
const uint8_t * | payload, | ||
uint16_t | payloadSize, | ||
bool | sendDscCmd, | ||
uint8_t | dscCmd | ||
) |
Write the long packet payload to TX FIFO. This function could be used in two ways
payload
. In this case, the DSC command is the first byte of payload
. The parameter sendDscCmd
is set to false, the dscCmd
is not used. This function is the same as DSI_WriteApbTxPayload when used in this way.payload
, but specified by parameter dscCmd
. In this case, the parameter sendDscCmd
is set to true, the dscCmd
is the DSC command to send. The payload
is sent after dscCmd
.base | MIPI DSI host peripheral base address. |
payload | Pointer to the payload. |
payloadSize | Payload size in byte. |
sendDscCmd | If set to true, the DSC command is specified by dscCmd , otherwise the DSC command is included in the payload . |
dscCmd | The DSC command to send, only used when sendDscCmd is true. |
void DSI_ReadApbRxPayload | ( | const MIPI_DSI_Type * | base, |
uint8_t * | payload, | ||
uint16_t | payloadSize | ||
) |
Read the long packet payload from RX FIFO. This function reads directly but does not check the RX FIFO status. Upper layer should make sure there are available data.
base | MIPI DSI host peripheral base address. |
payload | Pointer to the payload. |
payloadSize | Payload size in byte. |
|
inlinestatic |
Send the packet set by DSI_SetApbPacketControl.
base | MIPI DSI host peripheral base address. |
|
inlinestatic |
The return value is OR'ed value of _dsi_apb_status.
base | MIPI DSI host peripheral base address. |
|
inlinestatic |
The return value is OR'ed value of _dsi_rx_error_status.
base | MIPI DSI host peripheral base address. |
|
inlinestatic |
When one-bit ECC RX error detected using DSI_GetRxErrorStatus, this function could be used to get the error bit position.
rxErrorStatus | The error status returned by DSI_GetRxErrorStatus. |
|
inlinestatic |
The host status are returned as mask value of _dsi_host_status.
base | MIPI DSI host peripheral base address. |
|
inlinestatic |
base | MIPI DSI host peripheral base address. |
|
inlinestatic |
Extract the RX packet type from the packet header get by DSI_GetRxPacketHeader.
rxPktHeader | The RX packet header get by DSI_GetRxPacketHeader. |
|
inlinestatic |
Extract the RX packet word count from the packet header get by DSI_GetRxPacketHeader.
rxPktHeader | The RX packet header get by DSI_GetRxPacketHeader. |
|
inlinestatic |
Extract the RX packet virtual channel from the packet header get by DSI_GetRxPacketHeader.
rxPktHeader | The RX packet header get by DSI_GetRxPacketHeader. |
status_t DSI_TransferBlocking | ( | const MIPI_DSI_Type * | base, |
dsi_transfer_t * | xfer | ||
) |
Perform APB data transfer using blocking method. This function waits until all data send or received, or timeout happens.
When using this API to read data, the actually read data count could be got from xfer->rxDataSize.
base | MIPI DSI host peripheral base address. |
xfer | Pointer to the transfer structure. |
kStatus_Success | Data transfer finished with no error. |
kStatus_Timeout | Transfer failed because of timeout. |
kStatus_DSI_RxDataError | RX data error, user could use DSI_GetRxErrorStatus to check the error details. |
kStatus_DSI_ErrorReportReceived | Error Report packet received, user could use DSI_GetAndClearHostStatus to check the error report status. |
kStatus_DSI_NotSupported | Transfer format not supported. |
kStatus_DSI_Fail | Transfer failed for other reasons. |
status_t DSI_TransferCreateHandle | ( | const MIPI_DSI_Type * | base, |
dsi_handle_t * | handle, | ||
dsi_callback_t | callback, | ||
void * | userData | ||
) |
This function initializes the MIPI DSI handle which can be used for other transactional APIs.
base | MIPI DSI host peripheral base address. |
handle | Handle pointer. |
callback | Callback function. |
userData | User data. |
status_t DSI_TransferNonBlocking | ( | const MIPI_DSI_Type * | base, |
dsi_handle_t * | handle, | ||
dsi_transfer_t * | xfer | ||
) |
Perform APB data transfer using interrupt method, when transfer finished, upper layer could be informed through callback function.
When using this API to read data, the actually read data count could be got from handle->xfer->rxDataSize after read finished.
base | MIPI DSI host peripheral base address. |
handle | pointer to dsi_handle_t structure which stores the transfer state. |
xfer | Pointer to the transfer structure. |
kStatus_Success | Data transfer started successfully. |
kStatus_DSI_Busy | Failed to start transfer because DSI is busy with pervious transfer. |
kStatus_DSI_NotSupported | Transfer format not supported. |
void DSI_TransferAbort | ( | const MIPI_DSI_Type * | base, |
dsi_handle_t * | handle | ||
) |
base | MIPI DSI host peripheral base address. |
handle | pointer to dsi_handle_t structure which stores the transfer state. |
void DSI_TransferHandleIRQ | ( | const MIPI_DSI_Type * | base, |
dsi_handle_t * | handle | ||
) |
base | MIPI DSI host peripheral base address. |
handle | pointer to dsi_handle_t structure which stores the transfer state. |