mipicsiss
Vitis Drivers API Documentation
|
Data Structures | |
struct | CsiRxSsSubCore |
Sub-Core Configuration Table. More... | |
struct | XCsiSs_Config |
MIPI CSI Rx Subsystem configuration structure. More... | |
struct | XCsiSs |
The XCsiSs driver instance data. More... | |
Macros | |
#define | XCSISS_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XCSISS_HW_H_ |
Prevent circular inclusions by using protection macros. More... | |
Typedefs | |
typedef void(* | XCsiSs_Callback )(void *CallbackRef, u32 Mask) |
Callback type which acts as a wrapper on top of CSI Callback. More... | |
Functions | |
u32 | XCsiSs_CfgInitialize (XCsiSs *InstancePtr, XCsiSs_Config *CfgPtr, UINTPTR EffectiveAddr) |
This function initializes the MIPI CSI subsystem and included sub-cores. More... | |
u32 | XCsiSs_Configure (XCsiSs *InstancePtr, u8 ActiveLanes, u32 IntrMask) |
This function is used to configure the CSI lanes and interrupts that are to be handled by the application. More... | |
u32 | XCsiSs_Activate (XCsiSs *InstancePtr, u8 Flag) |
This function is used to activate the CSI Subsystem. More... | |
u32 | XCsiSs_Reset (XCsiSs *InstancePtr) |
This function is used to reset the CSI Subsystem. More... | |
void | XCsiSs_ReportCoreInfo (XCsiSs *InstancePtr) |
This function reports list of cores included. More... | |
void | XCsiSs_SetVCSelection (XCsiSs *InstancePtr, u16 Value) |
This function will control the virtual channels selection dynamically. More... | |
u32 | XCsiSs_GetVCSelection (XCsiSs *InstancePtr) |
This function will return the virtual channels selected. More... | |
void | XCsiSs_GetShortPacket (XCsiSs *InstancePtr) |
This function gets the short packets. More... | |
void | XCsiSs_GetLaneInfo (XCsiSs *InstancePtr) |
This function gets the clk and data lane info. More... | |
void | XCsiSs_GetVCInfo (XCsiSs *InstancePtr) |
This function gets the virtual channel information. More... | |
XCsiSs_Config * | XCsiSs_LookupConfig (u32 DeviceId) |
This function looks for the device configuration based on the unique device ID. More... | |
u32 | XCsiSs_SelfTest (XCsiSs *InstancePtr) |
This function performs self test on MIPI CSI Rx Subsystem sub-cores. More... | |
void | XCsiSs_IntrHandler (void *InstancePtr) |
This function is the interrupt handler for the MIPI CSI Rx Subsystem. More... | |
void | XCsiSs_IntrDisable (XCsiSs *InstancePtr, u32 IntrMask) |
This function is used to disable the interrupts in the CSI core. More... | |
u32 | XCsiSs_SetCallBack (XCsiSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef) |
This routine installs an asynchronous callback function for the given HandlerType: More... | |
#define XCSISS_H_ |
Prevent circular inclusions by using protection macros.
#define XCSISS_HW_H_ |
Prevent circular inclusions by using protection macros.
typedef void(* XCsiSs_Callback)(void *CallbackRef, u32 Mask) |
Callback type which acts as a wrapper on top of CSI Callback.
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 XCSISS_ISR_*_MASK constants defined in xcsiss_hw.h. |
u32 XCsiSs_Activate | ( | XCsiSs * | InstancePtr, |
u8 | Flag | ||
) |
This function is used to activate the CSI Subsystem.
Internally it activates the DPHY and CSI.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
Flag | is used to denote whether to enable or disable the subsystem |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::IsDphyRegIntfcPresent.
Referenced by CsiSs_IntrExample(), and EnableCSI().
u32 XCsiSs_CfgInitialize | ( | XCsiSs * | InstancePtr, |
XCsiSs_Config * | CfgPtr, | ||
UINTPTR | EffectiveAddr | ||
) |
This function initializes the MIPI CSI 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.
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. |
References XCsiSs_Config::BaseAddr, XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs_Config::IsDphyRegIntfcPresent, and XCsiSs::IsReady.
Referenced by CsiSs_IntrExample(), CsiSs_SelfTestExample(), and InitializeCsiRxSs().
u32 XCsiSs_Configure | ( | XCsiSs * | InstancePtr, |
u8 | ActiveLanes, | ||
u32 | IntrMask | ||
) |
This function is used to configure the CSI lanes and interrupts that are to be handled by the application.
Refer to XCsi.h for interrupt masks.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
ActiveLanes | is no of active lanes to be configure. This value ranges between 1 and 4. In case Dynamic Active Lane config is enabled, this value can't exceed maximum lanes present. When Dynamic Active Lane config is disabled, it should be equal to maximum lanes. |
IntrMask | Indicates Mask for enable interrupts. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_IntrExample(), and EnableCSI().
void XCsiSs_GetLaneInfo | ( | XCsiSs * | InstancePtr | ) |
This function gets the clk and data lane info.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::ClkInfo, XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs::DLInfo, and XCsiSs_Config::LanesPresent.
void XCsiSs_GetShortPacket | ( | XCsiSs * | InstancePtr | ) |
This function gets the short packets.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::CsiPtr, and XCsiSs::SpktData.
Referenced by CsiSs_SPktEventHandler().
void XCsiSs_GetVCInfo | ( | XCsiSs * | InstancePtr | ) |
This function gets the virtual channel information.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs::VCInfo.
u32 XCsiSs_GetVCSelection | ( | XCsiSs * | InstancePtr | ) |
This function will return the virtual channels selected.
InstancePtr | is the XCsi instance to operate on |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::VcNo.
void XCsiSs_IntrDisable | ( | XCsiSs * | InstancePtr, |
u32 | IntrMask | ||
) |
This function is used to disable the interrupts in the CSI core.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
IntrMask | Indicates Mask for enable interrupts. |
References XCsiSs::CsiPtr.
void XCsiSs_IntrHandler | ( | void * | InstancePtr | ) |
This function is the interrupt handler for the MIPI CSI 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 XCsiSs_SetCallBack() during initialization phase.
InstancePtr | is a pointer to the XCsiSs core instance that just interrupted. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_IntrExample(), CsiSs_SetupIntrSystem(), InitializeCsiRxSs(), and main().
XCsiSs_Config * XCsiSs_LookupConfig | ( | u32 | DeviceId | ) |
This function looks for the device configuration based on the unique device ID.
The table XCsiSs_ConfigTable[] contains the configuration information for each instance of the device in the system.
DeviceId | is the unique device ID of the device being looked up |
Referenced by CsiSs_IntrExample(), CsiSs_SelfTestExample(), and InitializeCsiRxSs().
void XCsiSs_ReportCoreInfo | ( | XCsiSs * | InstancePtr | ) |
This function reports list of cores included.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::IsDphyRegIntfcPresent.
Referenced by CsiSs_IntrExample().
u32 XCsiSs_Reset | ( | XCsiSs * | InstancePtr | ) |
This function is used to reset the CSI Subsystem.
Internally it resets the DPHY and CSI only as the IIC instance is separately handled by the application.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_IntrExample(), DisableCSI(), and EnableCSI().
u32 XCsiSs_SelfTest | ( | XCsiSs * | InstancePtr | ) |
This function performs self test on MIPI CSI Rx Subsystem sub-cores.
InstancePtr | is a pointer to the XCsiSs core instance. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_SelfTestExample().
u32 XCsiSs_SetCallBack | ( | XCsiSs * | InstancePtr, |
u32 | HandlerType, | ||
void * | CallbackFunc, | ||
void * | CallbackRef | ||
) |
This routine installs an asynchronous callback function for the given HandlerType:
HandlerType Invoked by this driver when: ------------------------- -------------------------------------------------- XCSISS_HANDLER_DPHY A DPHY Level Error has been detected. XCSISS_HANDLER_PROTLVL A Protocol Level Error has been detected. XCSISS_HANDLER_PKTLVL A Packet Level Error has been detected. XCSISS_HANDLER_SHORTPACKET A Short packet has been received or the Short Packet FIFO is full. XCSISS_HANDLER_FRAMERECVD A Frame has been received XCSISS_HANDLER_OTHERERROR Any other type of interrupt has occured like Stream Line Buffer Full, Incorrect Lanes, etc
InstancePtr | is the XCsi 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 |
References XCsiSs::CsiPtr, and XCsiSs::IsReady.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
void XCsiSs_SetVCSelection | ( | XCsiSs * | InstancePtr, |
u16 | Value | ||
) |
This function will control the virtual channels selection dynamically.
InstancePtr | is the XCsi instance to operate on |
Value | will set the virtual channels corresponding to each bit value. |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::VcNo.