![]() |
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... | |
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... | |
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... | |
u32 | Csi2TxSs_IntrExample (u32 DeviceId) |
This function is the main entry point for the interrupt example using the XCsi2TxSs driver. More... | |
u32 | Csi2TxSs_PlatformInit (void) |
This function initialize required platform-specifc peripherals. More... | |
u32 | Csi2TxSs_SetupIntrSystem (XINTC *IntcInstPtr) |
This function sets up the interrupt system so interrupts can occur for the MIPI CSI2Tx Subsystem core. More... | |
void | Csi2TxSs_WrgLaneEventHandler (void *InstancePtr, u32 Mask) |
This function is called when Wrong number of lanes are configured by the MIPI CSI2Tx Subsystem core. More... | |
void | Csi2TxSs_GSPFullEventHandler (void *InstancePtr, u32 Mask) |
This function is called when Genric Short Packet FIFO is found full by the MIPI CSI2Tx Subsystem core. More... | |
void | Csi2TxSs_UlpsEventHandler (void *InstancePtr, u32 Mask) |
This function is called when there is a change in ULPS state of D-PHY Lanes. More... | |
void | Csi2TxSs_LinebufEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a Line buffer is full event recieved by MIPI CSI2Tx Subsystem core. More... | |
void | Csi2TxSs_WrgDTypeEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a event generated by unspported data type in GSP request to the MIPI CSI2Tx Subsystem core. More... | |
void | Csi2TxSs_UrunPixelEventHandler (void *InstancePtr, u32 Mask) |
This function is called when during packet transmission, byte stream FIFO is found to be starves for pixel by the MIPI CSI2Tx Subsystem core. More... | |
int | main () |
This is the main function for XCsi2TxSs interrupt example. More... | |
u32 | Csi2TxSs_SelfTestExample (u32 DeviceId) |
This function is the main entry point for the self test example using the XCsi2TxSs driver. 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_ |
#include <xcsi2txss.h>
Prevent circular inclusions by using protection macros.
#define XCSI2TXSS_HW_H_ |
#include <xcsi2txss_hw.h>
Prevent circular inclusions by using protection macros.
typedef void(* XCsi2TxSs_Callback) (void *CallbackRef, u32 Mask) |
#include <xcsi2txss.h>
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. |
void Csi2TxSs_GSPFullEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
#include <xcsi2txss_intr_example.c>
This function is called when Genric Short Packet FIFO is found full by the MIPI CSI2Tx Subsystem core.
InstancePtr | is a pointer to the XCsi2TxSs instance. |
Mask | of interrupt which caused this event |
u32 Csi2TxSs_IntrExample | ( | u32 | DeviceId | ) |
#include <xcsi2txss_intr_example.c>
This function is the main entry point for the interrupt example using the XCsi2TxSs driver.
This function will set up the system with interrupts handlers.
DeviceId | is the unique device ID of the MIPI CSI2Tx Subsystem core. |
Referenced by main().
void Csi2TxSs_LinebufEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
#include <xcsi2txss_intr_example.c>
This function is called when a Line buffer is full event recieved by MIPI CSI2Tx Subsystem core.
InstancePtr | is a pointer to the XCsi2TxSs instance. |
Mask | of interrupt which caused this event |
u32 Csi2TxSs_PlatformInit | ( | void | ) |
#include <xcsi2txss_intr_example.c>
This function initialize required platform-specifc peripherals.
None. |
u32 Csi2TxSs_SelfTestExample | ( | u32 | DeviceId | ) |
#include <xcsi2txss_selftest_example.c>
This function is the main entry point for the self test example using the XCsi2TxSs driver.
This function check whether or not its sub-core drivers self test functions are in working state.
DeviceId | is the unique device ID of the MIPI CSI2 TX Subsystem core. |
References XCsi2TxSs_Config::BaseAddr, XCsi2TxSs_CfgInitialize(), XCsi2TxSs_LookupConfig(), and XCsi2TxSs_SelfTest().
u32 Csi2TxSs_SetupIntrSystem | ( | XINTC * | IntcInstPtr | ) |
#include <xcsi2txss_intr_example.c>
This function sets up the interrupt system so interrupts can occur for the MIPI CSI2Tx Subsystem core.
The function is application-specific since the actual system may or may not have an interrupt controller. The MIPI CSI Subsystem core could be directly connected to a processor without an interrupt controller. The user should modify this function to fit the application.
IntcInstPtr | is a pointer to interrupt controller |
void Csi2TxSs_UlpsEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
#include <xcsi2txss_intr_example.c>
This function is called when there is a change in ULPS state of D-PHY Lanes.
InstancePtr | is a pointer to the XCsi2TxSs instance. |
Mask | of interrupt which caused this event |
void Csi2TxSs_UrunPixelEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
#include <xcsi2txss_intr_example.c>
This function is called when during packet transmission, byte stream FIFO is found to be starves for pixel by the MIPI CSI2Tx Subsystem core.
InstancePtr | is a pointer to the XCsi2TxSs instance. |
Mask | of interrupt which caused this event |
void Csi2TxSs_WrgDTypeEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
#include <xcsi2txss_intr_example.c>
This function is called when a event generated by unspported data type in GSP request to the MIPI CSI2Tx Subsystem core.
InstancePtr | is a pointer to the XCsi2TxSs instance. |
Mask | of interrupt which caused this event |
void Csi2TxSs_WrgLaneEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
#include <xcsi2txss_intr_example.c>
This function is called when Wrong number of lanes are configured by the MIPI CSI2Tx Subsystem core.
InstancePtr | is a pointer to the XCsi2TxSs instance. |
Mask | of interrupt which caused this event |
int main | ( | ) |
#include <xcsi2txss_intr_example.c>
This is the main function for XCsi2TxSs interrupt example.
This is the main function for XCsi2TxSs self test example.
If the Csi2TxSs_IntrExample function which sets up the system succeeds, this function will wait for the interrupts. Once a connection event or pulse is detected, Csi2TxSs will TX device capabilities and re-start the subsystem.
None. |
None. |
References Csi2TxSs_IntrExample().
u32 XCsi2TxSs_Activate | ( | XCsi2TxSs * | InstancePtr, |
u8 | Flag | ||
) |
#include <xcsi2txss.c>
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.
u32 XCsi2TxSs_CfgInitialize | ( | XCsi2TxSs * | InstancePtr, |
XCsi2TxSs_Config * | CfgPtr, | ||
UINTPTR | EffectiveAddr | ||
) |
#include <xcsi2txss.c>
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, and XCsi2TxSs::Config.
Referenced by Csi2TxSs_SelfTestExample().
u32 XCsi2TxSs_Configure | ( | XCsi2TxSs * | InstancePtr, |
u8 | ActiveLanes, | ||
u32 | IntrMask | ||
) |
#include <xcsi2txss.c>
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. |
u32 XCsi2TxSs_GetClkMode | ( | XCsi2TxSs * | InstancePtr | ) |
#include <xcsi2txss.c>
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_GetMaxLaneCount | ( | XCsi2TxSs * | InstancePtr | ) |
#include <xcsi2txss.c>
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 | ) |
#include <xcsi2txss.c>
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 | ) |
#include <xcsi2txss.c>
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 | ||
) |
#include <xcsi2txss.h>
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. |
void XCsi2TxSs_IntrHandler | ( | void * | InstancePtr | ) |
#include <xcsi2txss.h>
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. |
u32 XCsi2TxSs_IsUlps | ( | XCsi2TxSs * | InstancePtr | ) |
#include <xcsi2txss.c>
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 | ||
) |
#include <xcsi2txss.c>
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 | ) |
#include <xcsi2txss.h>
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_SelfTestExample().
void XCsi2TxSs_ReportCoreInfo | ( | XCsi2TxSs * | InstancePtr | ) |
#include <xcsi2txss.c>
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.
u32 XCsi2TxSs_Reset | ( | XCsi2TxSs * | InstancePtr | ) |
#include <xcsi2txss.c>
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. |
u32 XCsi2TxSs_SelfTest | ( | XCsi2TxSs * | InstancePtr | ) |
#include <xcsi2txss.h>
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 | ||
) |
#include <xcsi2txss.h>
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
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.
void XCsi2TxSs_SetClkMode | ( | XCsi2TxSs * | InstancePtr, |
u8 | Mode | ||
) |
#include <xcsi2txss.c>
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 | ||
) |
#include <xcsi2txss.c>
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 |
void XCsi2TxSs_SetUlps | ( | XCsi2TxSs * | InstancePtr, |
u32 | Value | ||
) |
#include <xcsi2txss.c>
This function is used to set lanes in ulps mode.
InstancePtr | is a pointer to the CSI2TX SS Instance to be worked on. |
Value |
|