dsirxss
Vitis Drivers API Documentation
Overview

Data Structures

struct  Dsi2RxSsSubCores
 Sub-Core Configuration Table. More...
 
struct  XDsi2RxSs_Config
 MIPI DSI Rx Subsystem configuration structure. More...
 
struct  XDsi2RxSs
 The XDsi2RxSs driver instance data. More...
 

Typedefs

typedef void(* XDsi2RxSs_Callback )(void *CallbackRef, u32 Mask)
 Callback type for all interrupts defined. More...
 

Enumerations

enum  XDsi2RxSs_Selection
 Subsystem Enable/Disable. More...
 
enum  XDsi2RxSs_SubCore
 Sub-Core Enable/Disable. More...
 

Functions

s32 XDsi2RxSs_CfgInitialize (XDsi2RxSs *InstancePtr, XDsi2RxSs_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the MIPI DSI RX subsystem and included sub-cores. More...
 
u32 XDsi2RxSs_DefaultConfigure (XDsi2RxSs *InstancePtr)
 This function is used to configure the DSI2RX default parameters that are to be handled by the application. More...
 
int XDsi2RxSs_Activate (XDsi2RxSs *InstancePtr, XDsi2RxSs_SubCore core, u8 Flag)
 This function is used to activate the DSI2RX Subsystem. More...
 
void XDsi2RxSs_Reset (XDsi2RxSs *InstancePtr)
 This function is used to reset the DSI2RX Subsystem. More...
 
void XDsi2RxSs_ReportCoreInfo (XDsi2RxSs *InstancePtr)
 This function reports list of cores included in DSI RX Subsystem. More...
 
void XDsi2RxSs_GetConfigParams (XDsi2RxSs *InstancePtr)
 This function will get the information from the GUI settings. More...
 
u32 XDsi2RxSs_IsControllerReady (XDsi2RxSs *InstancePtr)
 This function will get the information from the GUI settings. More...
 
u32 XDsi2RxSs_GetPixelFormat (XDsi2RxSs *InstancePtr)
 This function is used to get pixel format. More...
 
XDsi2RxSs_ConfigXDsi2RxSs_LookupConfig (UINTPTR BaseAddress)
 This function looks for the device configuration based on the unique device ID. More...
 
u32 XDsi2RxSs_GetDrvIndex (XDsi2RxSs *InstancePtr, UINTPTR BaseAddress)
 This function returns the Index number of config table using BaseAddress. More...
 
u32 XDsi2RxSs_SetCallback (XDsi2RxSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
 This routine installs an asynchronous callback function for the given HandlerType: More...
 
void XDsi2RxSs_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the MIPI DSI2 Rx Subsystem. More...
 
void XDsi2RxSs_SetGlobalInterrupt (void *InstancePtr)
 This function will enable the interrupts present in the interrupt mask passed onto the function. More...
 
void XDsi2RxSs_InterruptEnable (void *InstancePtr, u32 Mask)
 This function will enable the interrupts present in the interrupt mask passed onto the function. More...
 

Typedef Documentation

typedef void(* XDsi2RxSs_Callback)(void *CallbackRef, u32 Mask)

Callback type for all interrupts defined.

Parameters
CallbackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
Maskis a bit mask indicating the cause of the event. For current core version, this parameter is "OR" of 0 or more XDSIRXSS_ISR_*_MASK constants defined in xdsirxss_hw.h.
Returns
None.
Note
None.

Enumeration Type Documentation

Subsystem Enable/Disable.

Sub-Core Enable/Disable.

Function Documentation

int XDsi2RxSs_Activate ( XDsi2RxSs InstancePtr,
XDsi2RxSs_SubCore  core,
u8  Flag 
)

This function is used to activate the DSI2RX Subsystem.

Internally it activates the DPHY and DSI2RX. Enable/Disable IP core to start processing

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
coreis used to denote the subcore of subsystem
Flagis used to denote whether to enable or disable the subsystem
Returns
XST_SUCCESS is returned if subcore(DSI/DPHY) was successfully enabled or disabled XST_INVALID_PARAM is returned if subsystem core is not found
Note
None.

References XDsi2RxSs::Dsi2RxPtr.

s32 XDsi2RxSs_CfgInitialize ( XDsi2RxSs InstancePtr,
XDsi2RxSs_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the MIPI DSI RX subsystem and included sub-cores.

This function must be called prior to using the subsystem. Initialization includes setting up the instance data for top level as well as all included sub-core therein, and ensuring the hardware is in a known stable state

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
CfgPtrpoints to the configuration structure associated with the subsystem instance.
EffectiveAddris the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if initialization is successful
  • XST_FAILURE if initialization is failure
Note
None.

References XDsi2RxSs_Config::BaseAddr, XDsi2RxSs::Config, XDsi2RxSs::Dsi2RxPtr, and XDsi2RxSs::IsReady.

Referenced by Dsi2RxSs_SelfTestExample().

u32 XDsi2RxSs_DefaultConfigure ( XDsi2RxSs InstancePtr)

This function is used to configure the DSI2RX default parameters that are to be handled by the application.

It will configure protocol register with Pixel mode.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
  • XST_SUCCESS on successful configuration of parameters
  • XST_FAILURE on failure scenraio
Note
None.

References XDsi2RxSs::Dsi2RxPtr.

void XDsi2RxSs_GetConfigParams ( XDsi2RxSs InstancePtr)

This function will get the information from the GUI settings.

Parameters
InstancePtris the XDsi instance to operate on
Returns
None
Note
None.

References XDsi2RxSs::ConfigInfo, and XDsi2RxSs::Dsi2RxPtr.

u32 XDsi2RxSs_GetDrvIndex ( XDsi2RxSs InstancePtr,
UINTPTR  BaseAddress 
)

This function returns the Index number of config table using BaseAddress.

Parameters
Apointer to the instance structure
Baseaddress of the instance
Returns
Index number of the config table
u32 XDsi2RxSs_GetPixelFormat ( XDsi2RxSs InstancePtr)

This function is used to get pixel format.

Parameters
InstancePtris a pointer to the DsiRxSs Instance to be worked on.
Returns
0x0E – Packed RGB565 0x1E- packed RGB666 0x2E – Loosely packed RGB666 0x3E- Packed RGB888 0x0B- Compressed Pixel Stream
Note
None

References XDsi2RxSs::Dsi2RxPtr.

void XDsi2RxSs_InterruptEnable ( void *  InstancePtr,
u32  Mask 
)

This function will enable the interrupts present in the interrupt mask passed onto the function.

Parameters
InstancePtris the XDsi2RxSs instance to operate on
Maskis the interrupt mask which need to be enabled in core
Returns
None

References XDsi2RxSs::Dsi2RxPtr.

void XDsi2RxSs_IntrHandler ( void *  InstancePtr)

This function is the interrupt handler for the MIPI DSI2 Rx Subsystem.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XDsi2RxSs_SetCallback() during initialization phase.

Parameters
InstancePtris a pointer to the XDsi2RxSs core instance that just interrupted.
Returns
None.
Note
None.

References XDsi2RxSs::Dsi2RxPtr.

u32 XDsi2RxSs_IsControllerReady ( XDsi2RxSs InstancePtr)

This function will get the information from the GUI settings.

Parameters
InstancePtris the XDsi2RxSs instance to operate on
Returns
Controller ready status
Note
None.

References XDsi2RxSs::Dsi2RxPtr.

XDsi2RxSs_Config * XDsi2RxSs_LookupConfig ( UINTPTR  BaseAddress)

This function looks for the device configuration based on the unique device ID.

The table XDsi2RxSs_ConfigTable[] contains the configuration information for each instance of the device in the system.

Parameters
BaseAddressis the unique address of the device being looked up
Returns
A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found
Note
None.

Referenced by Dsi2RxSs_SelfTestExample().

void XDsi2RxSs_ReportCoreInfo ( XDsi2RxSs InstancePtr)

This function reports list of cores included in DSI RX Subsystem.

Parameters
InstancePtris a pointer to the DSI RX Subsystem instance.
Returns
None
Note
None.

References XDsi2RxSs::Config, XDsi2RxSs_Config::DphyInfo, XDsi2RxSs::Dsi2RxPtr, and Dsi2RxSsSubCores::IsPresent.

void XDsi2RxSs_Reset ( XDsi2RxSs InstancePtr)

This function is used to reset the DSI2RX Subsystem.

Internally it resets the DPHY and DSI

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None
Note
None.

References XDsi2RxSs::Config, XDsi2RxSs::Dsi2RxPtr, and XDsi2RxSs_Config::IsDphyRegIntfcPresent.

u32 XDsi2RxSs_SetCallback ( XDsi2RxSs InstancePtr,
u32  HandlerType,
void *  CallbackFunc,
void *  CallbackRef 
)

This routine installs an asynchronous callback function for the given HandlerType:

HandlerType                     Invoked by this driver when:
-----------------------  --------------------------------------------------
XDSI2RX_HANDLER_UNSUPPORT_DATATYPE      Unsupported data type
XDSI2RX_HANDLER_CRC_ERROR               CRC error
XDSI2RX_HANDLER_ECC1_BIT_ERROR  ECC 1 bit error
XDSI2RX_HANDLER_ECC2_BIT_ERROR  ECC 2 bit error
XDSI2RX_HANDLER_SOT_SYNC_ERR_LANE1      SOT sync error on line 1
XDSI2RX_HANDLER_SOT_ERR_LANE1           SOT error on line 1
XDSI2RX_HANDLER_SOT_SYNC_ERR_LANE2      SOT sync error on line 2
XDSI2RX_HANDLER_SOT_ERR_LANE2           SOT error on line 2
XDSI2RX_HANDLER_SOT_SYNC_ERR_LANE3      SOT sync error on line 3
XDSI2RX_HANDLER_SOT_ERR_LANE3           SOT error on line 3
XDSI2RX_HANDLER_SOT_SYNC_ERR_LANE4      SOT sync error on line 4
XDSI2RX_HANDLER_SOT_ERR_LANE4           SOT error on line 4
XDSI2RX_HANDLER_STOP_STATE              STOP state
XDSI2RX_HANDLER_LM_ASYNC_FIFO_FULL      Long msg asyn fifo full.
XDSI2RX_HANDLER_STREAM_ASYNC_FIFO_FULL stream async fifo full
XDSI2RX_HANDLER_GSP_FIFO_NE             generic short packet fifo not empty
XDSI2RX_HANDLER_GSP_FIFO_FULL           generic short packet fifo full
XDSI2RX_HANDLER_FRAME_STARTED           frame started
*
Parameters
InstancePtris the XDsi2Rx instance to operate on
HandlerTypeis the type of call back to be registered.
CallbackFuncis the pointer to a call back funtion which is called when a particular event occurs.
CallbackRefis a void pointer to data to be referenced to by the CallbackFunc
Returns
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

References XDsi2RxSs::Dsi2RxPtr, and XDsi2RxSs::IsReady.

void XDsi2RxSs_SetGlobalInterrupt ( void *  InstancePtr)

This function will enable the interrupts present in the interrupt mask passed onto the function.

Parameters
InstancePtris the XDsi2RxSs instance to operate on
Returns
None
Note
None.

References XDsi2RxSs::Dsi2RxPtr.