![]() |
csi2txss
Xilinx SDK Drivers API Documentation
|
Data Structures | |
struct | SubCoreCsi2Tx |
Sub-Core Configuration Table. More... | |
struct | XCsi2TxSs_Config |
MIPI CSI Tx Subsystem configuration structure. More... | |
struct | XCsi2TxSs |
The XCsi2TxSs driver instance data. More... | |
Macros | |
#define | XCSI2TXSS_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XCSI2TXSS_HW_H_ |
Prevent circular inclusions by using protection macros. More... | |
Typedefs | |
typedef void(* | XCsi2TxSs_Callback )(void *CallbackRef, u32 Mask) |
Callback type which acts as a wrapper on top of CSI Callback. More... | |
Enumerations | |
enum | XCsi2TxSS_LCStatus { XCSI2TXSS_LC_LESS_LINES = XCSI2TX_LC_LESS_LINES, XCSI2TXSS_LC_MORE_LINES = XCSI2TX_LC_MORE_LINES } |
This typedef defines the different errors codes for Line Count status for a Virtual Channel when Frame End Generation is enabled. More... | |
Functions | |
u32 | XCsi2TxSs_CfgInitialize (XCsi2TxSs *InstancePtr, XCsi2TxSs_Config *CfgPtr, UINTPTR EffectiveAddr) |
This function initializes the MIPI CSI subsystem and included sub-cores. More... | |
u32 | XCsi2TxSs_Configure (XCsi2TxSs *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 | XCsi2TxSs_Activate (XCsi2TxSs *InstancePtr, u8 Flag) |
This function is used to activate the CSI Subsystem. More... | |
u32 | XCsi2TxSs_Reset (XCsi2TxSs *InstancePtr) |
This function is used to reset the CSI Subsystem. More... | |
void | XCsi2TxSs_ReportCoreInfo (XCsi2TxSs *InstancePtr) |
This function reports list of cores included. More... | |
void | XCsi2TxSs_GetShortPacket (XCsi2TxSs *InstancePtr) |
This function gets the short packets. More... | |
void | XCsi2TxSs_LineGen (XCsi2TxSs *InstancePtr, u32 Value) |
This function is to set the Line Synchronization packet Generation status. More... | |
void | XCsi2TxSs_SetGSPEntry (XCsi2TxSs *InstancePtr, u32 Value) |
This function is to set Generic Short Packet Entries. More... | |
u32 | XCsi2TxSs_GetPixelMode (XCsi2TxSs *InstancePtr) |
This function is used to get the Pixel Mode. More... | |
u32 | XCsi2TxSs_GetMaxLaneCount (XCsi2TxSs *InstancePtr) |
This function is used to get the number of lanes configured in the IP. More... | |
u32 | XCsi2TxSs_IsUlps (XCsi2TxSs *InstancePtr) |
This function is used to check if lanes are in ulps mode. More... | |
void | XCsi2TxSs_SetUlps (XCsi2TxSs *InstancePtr, u32 Value) |
This function is used to set lanes in ulps mode. More... | |
void | XCsi2TxSs_SetClkMode (XCsi2TxSs *InstancePtr, u8 Mode) |
This function is used to set the CSI2 Tx Subsystem Clock Mode as either Continuous (0) or Non-Continuous (1) mode. More... | |
u32 | XCsi2TxSs_GetClkMode (XCsi2TxSs *InstancePtr) |
This function is used to get the CSI2 Tx Subsystem Clock Mode as either Continuous (0) or Non-Continuous (1) mode. More... | |
u32 | XCsi2TxSs_SetLineCountForVC (XCsi2TxSs *InstancePtr, u8 VC, u16 LineCount) |
This function sets the Line Count for virtual Channel if Frame End Generation feature is enabled. More... | |
u32 | XCsi2TxSs_GetLineCountForVC (XCsi2TxSs *InstancePtr, u8 VC, u16 *LineCount) |
This function gets the Line Count for virtual Channel if Frame End Generation feature is enabled. More... | |
XCsi2TxSs_Config * | XCsi2TxSs_LookupConfig (u32 DeviceId) |
This function looks for the device configuration based on the unique device ID. More... | |
u32 | XCsi2TxSs_SelfTest (XCsi2TxSs *InstancePtr) |
This function performs self test on MIPI CSI Tx Subsystem sub-cores. More... | |
void | XCsi2TxSs_IntrHandler (void *InstancePtr) |
This function is the interrupt handler for the MIPI CSI2 Tx Subsystem. More... | |
void | XCsi2TxSs_IntrDisable (XCsi2TxSs *InstancePtr, u32 IntrMask) |
This function is used to disable the interrupts in the CSI core. More... | |
u32 | XCsi2TxSs_SetCallBack (XCsi2TxSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef) |
This routine installs an asynchronous callback function for the given HandlerType: More... | |
Clock Modes for CSI2 Tx | |
These macros are used to set/get the clock mode in CSI2 Tx. CCM - continuous clock mode. NCCM - non-continuous clock mode. | |
#define | XCSI2TXSS_CCM 0 |
#define | XCSI2TXSS_NCCM 1 |
#define XCSI2TXSS_H_ |
Prevent circular inclusions by using protection macros.
#define XCSI2TXSS_HW_H_ |
Prevent circular inclusions by using protection macros.
typedef void(* XCsi2TxSs_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 XCSI2TXSS_ISR_*_MASK constants defined in xcsi2txss_hw.h. |
enum XCsi2TxSS_LCStatus |
u32 XCsi2TxSs_Activate | ( | XCsi2TxSs * | 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 XCsi2TxSs::Config, and XCsi2TxSs_Config::IsDphyRegIntfcPresent.
Referenced by Csi2TxSs_IntrExample().
u32 XCsi2TxSs_CfgInitialize | ( | XCsi2TxSs * | InstancePtr, |
XCsi2TxSs_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 XCsi2TxSs_Config::BaseAddr, XCsi2TxSs::Config, XCsi2TxSs_Config::IsDphyRegIntfcPresent, and XCsi2TxSs::IsReady.
Referenced by Csi2TxSs_IntrExample(), and Csi2TxSs_SelfTestExample().
u32 XCsi2TxSs_Configure | ( | XCsi2TxSs * | 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 XCsi2Tx.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. |
IntrMask | Indicates Mask for enable interrupts. |
References XCsi2TxSs::Config, and XCsi2TxSs_Config::FEGenEnabled.
Referenced by Csi2TxSs_IntrExample().
u32 XCsi2TxSs_GetClkMode | ( | XCsi2TxSs * | InstancePtr | ) |
This function is used to get the CSI2 Tx Subsystem Clock Mode as either Continuous (0) or Non-Continuous (1) mode.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
u32 XCsi2TxSs_GetLineCountForVC | ( | XCsi2TxSs * | InstancePtr, |
u8 | VC, | ||
u16 * | LineCount | ||
) |
This function gets the Line Count for virtual Channel if Frame End Generation feature is enabled.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
VC | is which Virtual channel to be configured for (0-3). |
LineCount | is pointer to variable to be filled with line count for the Virtual channel |
References XCsi2TxSs::Config, and XCsi2TxSs_Config::FEGenEnabled.
u32 XCsi2TxSs_GetMaxLaneCount | ( | XCsi2TxSs * | InstancePtr | ) |
This function is used to get the number of lanes configured in the IP.
InstancePtr | is a pointer to the CSI2TX SS Instance to be worked on. |
u32 XCsi2TxSs_GetPixelMode | ( | XCsi2TxSs * | InstancePtr | ) |
This function is used to get the Pixel Mode.
InstancePtr | is a pointer to the CSI2TX SS Instance to be worked on. |
void XCsi2TxSs_GetShortPacket | ( | XCsi2TxSs * | InstancePtr | ) |
This function gets the short packets.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsi2TxSs::SpktData.
void XCsi2TxSs_IntrDisable | ( | XCsi2TxSs * | 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 XCsi2TxSs::Config, and XCsi2TxSs_Config::FEGenEnabled.
void XCsi2TxSs_IntrHandler | ( | void * | InstancePtr | ) |
This function is the interrupt handler for the MIPI CSI2 Tx 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 XCsi2TxSs_SetCallBack() during initialization phase.
InstancePtr | is a pointer to the XCsi2TxSs core instance that just interrupted. |
Referenced by Csi2TxSs_SetupIntrSystem().
u32 XCsi2TxSs_IsUlps | ( | XCsi2TxSs * | InstancePtr | ) |
This function is used to check if lanes are in ulps mode.
InstancePtr | is a pointer to the CSI2TX SS Instance to be worked on. |
void XCsi2TxSs_LineGen | ( | XCsi2TxSs * | InstancePtr, |
u32 | Value | ||
) |
This function is to set the Line Synchronization packet Generation status.
InstancePtr | is a pointer to the CSI2 TX SS Instance to be worked on. |
Value | 0 : DISABLE 1 : ENABLE |
XCsi2TxSs_Config * XCsi2TxSs_LookupConfig | ( | u32 | DeviceId | ) |
This function looks for the device configuration based on the unique device ID.
The table XCsi2TxSs_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 Csi2TxSs_IntrExample(), and Csi2TxSs_SelfTestExample().
void XCsi2TxSs_ReportCoreInfo | ( | XCsi2TxSs * | InstancePtr | ) |
This function reports list of cores included.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsi2TxSs::Config, and XCsi2TxSs_Config::IsDphyRegIntfcPresent.
Referenced by Csi2TxSs_IntrExample().
u32 XCsi2TxSs_Reset | ( | XCsi2TxSs * | InstancePtr | ) |
This function is used to reset the CSI Subsystem.
Internally it resets the DPHY and CSI
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
Referenced by Csi2TxSs_IntrExample().
u32 XCsi2TxSs_SelfTest | ( | XCsi2TxSs * | InstancePtr | ) |
This function performs self test on MIPI CSI Tx Subsystem sub-cores.
InstancePtr | is a pointer to the XCsi2TxSs core instance. |
Referenced by Csi2TxSs_SelfTestExample().
u32 XCsi2TxSs_SetCallBack | ( | XCsi2TxSs * | InstancePtr, |
u32 | HandlerType, | ||
void * | CallbackFunc, | ||
void * | CallbackRef | ||
) |
This routine installs an asynchronous callback function for the given HandlerType:
HandlerType Invoked by this driver when: ------------------------- ------------------------------- (XCSI2TXSS_HANDLER_WRG_LANE) IncorrectLaneCallBack (XCSI2TXSS_HANDLER_GSPFIFO_FULL) GSPFIFOCallBack (XCSI2TXSS_HANDLER_ULPS) DPhyUlpsCallBack (XCSI2TXSS_HANDLER_LINEBUF_FULL) LineBufferCallBack (XCSI2TXSS_HANDLER_WRG_DATATYPE) WrgDataTypeCallBack (XCSI2TXSS_HANDLER_UNDERRUN_PIXEL) UnderrunPixelCallBack (XCSI2TXSS_HANDLER_LCERRVC0 LineCountErrVC0 (XCSI2TXSS_HANDLER_LCERRVC1 LineCountErrVC1 (XCSI2TXSS_HANDLER_LCERRVC2 LineCountErrVC2 (XCSI2TXSS_HANDLER_LCERRVC3 LineCountErrVC3
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 XCsi2TxSs::IsReady.
Referenced by Csi2TxSs_SetupIntrSystem().
void XCsi2TxSs_SetClkMode | ( | XCsi2TxSs * | InstancePtr, |
u8 | Mode | ||
) |
This function is used to set the CSI2 Tx Subsystem Clock Mode as either Continuous (0) or Non-Continuous (1) mode.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
Mode | for Continuous Mode (0) or Non-continuous Mode (1) |
void XCsi2TxSs_SetGSPEntry | ( | XCsi2TxSs * | InstancePtr, |
u32 | Value | ||
) |
This function is to set Generic Short Packet Entries.
InstancePtr | is a pointer to the CSI2 TX SS Instance to be worked on. |
Value | GSP 32 bit Entry |
u32 XCsi2TxSs_SetLineCountForVC | ( | XCsi2TxSs * | InstancePtr, |
u8 | VC, | ||
u16 | LineCount | ||
) |
This function sets the Line Count for virtual Channel if Frame End Generation feature is enabled.
This is to be called before starting the core.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
VC | is which Virtual channel to be configured for (0-3). |
LineCount | is valid line count for the Virtual channel. |
References XCsi2TxSs::Config, and XCsi2TxSs_Config::FEGenEnabled.
void XCsi2TxSs_SetUlps | ( | XCsi2TxSs * | InstancePtr, |
u32 | Value | ||
) |
This function is used to set lanes in ulps mode.
InstancePtr | is a pointer to the CSI2TX SS Instance to be worked on. |
Value |
|