| dsirxss Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Typedefs | Enumerations | Functions
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_Config * | XDsi2RxSs_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

  CallbackRef | is 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.
  Mask | is 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

enum XDsi2RxSs_Selection

Subsystem Enable/Disable.

enum XDsi2RxSs_SubCore

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

  InstancePtr | is a pointer to the Subsystem instance to be worked on.
  core | is used to denote the subcore of subsystem
  Flag | is 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

  InstancePtr | is a pointer to the Subsystem instance to be worked on.
  CfgPtr | points to the configuration structure associated with the subsystem instance.
  EffectiveAddr | is 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

  InstancePtr | is 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

  InstancePtr | is 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

  A | pointer to the instance structure
  Base | address of the instance

Returns
  Index number of the config table

u32 XDsi2RxSs_GetPixelFormat | ( | XDsi2RxSs * | InstancePtr | ) |

This function is used to get pixel format.

Parameters

  InstancePtr | is 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

  InstancePtr | is the XDsi2RxSs instance to operate on
  Mask | is 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

  InstancePtr | is 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

  InstancePtr | is 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

  BaseAddress | is 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

  InstancePtr | is 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

  InstancePtr | is 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

  InstancePtr | is the XDsi2Rx instance to operate on
  HandlerType | is the type of call back to be registered.
  CallbackFunc | is the pointer to a call back funtion which is called when a particular event occurs.
  CallbackRef | is 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

  InstancePtr | is the XDsi2RxSs instance to operate on

Returns
  None

Note
  None.

References XDsi2RxSs::Dsi2RxPtr.