![]() |
csi2tx
Xilinx SDK Drivers API Documentation
|
Data Structures | |
struct | XCsi2Tx_SPktData |
This typedef contains the Short Packet information from the Generic Short Packet Register. More... | |
struct | XCsi2Tx_Config |
The configuration structure for CSI Controller. More... | |
struct | XCsi2Tx |
The XCsi2Tx driver instance data. More... | |
Macros | |
#define | XCSI2TX_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XCSI2TX_ENABLE 1 |
Flag denoting enabling of CSI. More... | |
#define | XCSI2TX_DISABLE 0 |
Flag denoting disabling of CSI. More... | |
#define | XCSI2TX_MAX_LANES 4 |
Max Lanes supported by CSI. More... | |
#define | XCSI2TX_MAX_VC 4 |
Max number of Virtual Channels. More... | |
#define | XCSI2TX_HW_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XCSI2TX_GSP_MASK 0x00000001F |
Number of GSPs can be safely written to GSP FIFO, before it goes full. More... | |
Typedefs | |
typedef void(* | XCsi2Tx_CallBack )(void *CallBackRef, u32 Mask) |
Callback type for all interrupts defined. More... | |
Enumerations | |
enum | XCsi2Tx_LCStatus { XCSI2TX_LC_LESS_LINES = 1, 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 | XCsi2Tx_CfgInitialize (XCsi2Tx *InstancePtr, XCsi2Tx_Config *CfgPtr, UINTPTR EffectiveAddr) |
Initialize the XCsi2Tx instance provided by the caller based on the given Config structure. More... | |
u32 | XCsi2Tx_Reset (XCsi2Tx *InstancePtr) |
This function will do a reset of the IP. More... | |
u32 | XCsi2Tx_Activate (XCsi2Tx *InstancePtr, u8 Flag) |
Thsi function will enable/disable the IP Core to start processing. More... | |
u32 | XCsi2Tx_Configure (XCsi2Tx *InstancePtr) |
This function will configure the core with proper number of Active Lanes. More... | |
void | XCsi2Tx_GetShortPacket (XCsi2Tx *InstancePtr, XCsi2Tx_SPktData *ShortPacketStruct) |
This function will get the short packet received in the FIFO from the Generic Short Packet Register and fill up the structure passed from caller. More... | |
u8 | XCsi2Tx_IsActiveLaneCountValid (XCsi2Tx *InstancePtr, u8 ActiveLanesCount) |
This function checks the validity of the active lanes parameter. More... | |
u32 | XCsi2Tx_SetLineCountForVC (XCsi2Tx *InstancePtr, u8 VC, u16 LineCount) |
This function sets the Line Count for virtual Channel if Frame End Generation feature is enabled. More... | |
u32 | XCsi2Tx_GetLineCountForVC (XCsi2Tx *InstancePtr, u8 VC, u16 *LineCount) |
This function gets the Line Count for virtual Channel if Frame End Generation feature is enabled. More... | |
XCsi2Tx_Config * | XCsi2Tx_LookupConfig (u32 DeviceId) |
Look up the hardware configuration for a device instance. More... | |
u32 | XCsi2Tx_SelfTest (XCsi2Tx *InstancePtr) |
Runs a self-test on the driver/device. More... | |
void | XCsi2Tx_IntrHandler (void *InstancePtr) |
This function is the interrupt handler for the CSI2 Tx core. More... | |
int | XCsi2Tx_SetCallBack (XCsi2Tx *InstancePtr, u32 HandleType, void *Callbackfunc, void *Callbackref) |
This routine installs an asynchronous callback function for the given HandlerType: More... | |
u32 | XCsi2Tx_GetIntrEnable (XCsi2Tx *InstancePtr) |
This function will get the interrupt mask set (enabled) in the CSI2 Tx core. More... | |
void | XCsi2Tx_IntrEnable (XCsi2Tx *InstancePtr, u32 Mask) |
This function will enable the interrupts present in the interrupt mask passed onto the function. More... | |
void | XCsi2Tx_IntrDisable (XCsi2Tx *InstancePtr, u32 Mask) |
This function will disable the interrupts present in the interrupt mask passed onto the function. More... | |
u32 | XCsi2Tx_GetIntrStatus (XCsi2Tx *InstancePtr) |
This function will get the list of interrupts pending in the Interrupt Status Register of the CSI2 Tx core. More... | |
void | XCsi2Tx_InterruptClear (XCsi2Tx *InstancePtr, u32 Mask) |
This function will clear the interrupts set in the Interrupt Status Register of the CSI2 Tx core. More... | |
u32 | Csi2TxSelfTestExample (u32 DeviceId) |
This function checks if the Max Lane count from the generated file matches the value present in the protocol configuration register. More... | |
int | main () |
The entry point for this example. More... | |
Device registers | |
#define | XCSI2TX_CCR_OFFSET 0x00000000 |
Core Configuration Register. More... | |
#define | XCSI2TX_PCR_OFFSET |
#define | XCSI2TX_GIER_OFFSET 0x00000020 |
Global Interrupt Register. More... | |
#define | XCSI2TX_ISR_OFFSET 0x00000024 |
Interrupt Status Register. More... | |
#define | XCSI2TX_IER_OFFSET 0x00000028 |
Interrupt Enable Register. More... | |
#define | XCSI2TX_SPKTR_OFFSET 0x00000030 |
Generic Short Packet Entry. More... | |
#define | XCSI2TX_LINE_COUNT_VC0 0x00000040 |
Line Count for VC0. More... | |
#define | XCSI2TX_LINE_COUNT_VC1 0x00000044 |
Line Count for VC1. More... | |
#define | XCSI2TX_LINE_COUNT_VC2 0x00000048 |
Line Count for VC2. More... | |
#define | XCSI2TX_LINE_COUNT_VC3 0x0000004C |
Line Count for VC3. More... | |
#define | XCSI2TX_GSP_OFFSET 0x00000078 /* < GSP Status*/ |
Bitmasks and offsets of XCSI_GIER_OFFSET register | |
#define | XCSI2TX_GIER_GIE_MASK 0x00000001 |
Global Interrupt Enable bit. More... | |
#define | XCSI2TX_GIER_GIE_SHIFT 0 |
Shift bits for Global Interrupt Enable. More... | |
#define | XCSI2TX_GIER_SET 1 |
Enable the Global Interrupts. More... | |
#define | XCSI2TX_GIER_RESET 0 |
Disable the Global Interrupts. More... | |
BitMasks interrupts | |
#define | XCSI2TX_IER_ALLINTR_MASK 0x0000003F /* All interrupts mask */ |
#define | XCSI2TX_ISR_ALLINTR_MASK 0x0000003F /* All interrupts mask */ |
#define | XCSI2TX_UNDERRUN_PIXEL_MASK (1<<0) /* Underrun Pixel */ |
#define | XCSI2TX_WRONG_DATATYPE_MASK (1<<1) /* Wrong data type */ |
#define | XCSI2TX_LINE_BUFF_FULL_MASK (1<<2) /* Line buffer full */ |
#define | XCSI2TX_DPHY_ULPS_MASK (1<<3) /* Dphy ulps */ |
#define | XCSI_GPSFIFO_MASK (1<<4) /* GPS fifo full */ |
#define | XCSI_INCORT_LANE_MASK (1<<5) /* Wrong lane configuration */ |
#define | XCSITX_LCSTAT_VC0_IER_MASK (1<<8) |
Line Count Status for VC0 IER. More... | |
#define | XCSITX_LCSTAT_VC1_IER_MASK (1<<10) |
Line Count Status for VC1 IER. More... | |
#define | XCSITX_LCSTAT_VC2_IER_MASK (1<<12) |
Line Count Status for VC2 IER. More... | |
#define | XCSITX_LCSTAT_VC3_IER_MASK (1<<14) |
Line Count Status for VC3 IER. More... | |
#define | XCSITX_LCSTAT_VC0_IER_OFFSET (8) |
Line Count Status for VC0 IER Offset. More... | |
#define | XCSITX_LCSTAT_VC1_IER_OFFSET (10) |
Line Count Status for VC1 IER Offset. More... | |
#define | XCSITX_LCSTAT_VC2_IER_OFFSET (12) |
Line Count Status for VC2 IER Offset. More... | |
#define | XCSITX_LCSTAT_VC3_IER_OFFSET (14) |
Line Count Status for VC3 IER Offset. More... | |
#define | XCSITX_LCSTAT_VC0_ISR_MASK (0x3<<8) |
Line Count Status for VC0 ISR. More... | |
#define | XCSITX_LCSTAT_VC1_ISR_MASK (0x3<<10) |
Line Count Status for VC1 ISR. More... | |
#define | XCSITX_LCSTAT_VC2_ISR_MASK (0x3<<12) |
Line Count Status for VC2 ISR. More... | |
#define | XCSITX_LCSTAT_VC3_ISR_MASK (0x3<<14) |
Line Count Status for VC3 ISR. More... | |
#define | XCSITX_LCSTAT_VC0_ISR_OFFSET (8) |
Line Count Status for VC0 ISR Offset. More... | |
#define | XCSITX_LCSTAT_VC1_ISR_OFFSET (10) |
Line Count Status for VC1 ISR Offset. More... | |
#define | XCSITX_LCSTAT_VC2_ISR_OFFSET (12) |
Line Count Status for VC2 ISR Offset. More... | |
#define | XCSITX_LCSTAT_VC3_ISR_OFFSET (14) |
Line Count Status for VC3 ISR Offset. More... | |
#define XCSI2TX_CCR_OFFSET 0x00000000 |
Core Configuration Register.
Referenced by XCsi2Tx_SelfTest(), and XCsi2Tx_SetLineCountForVC().
#define XCSI2TX_DISABLE 0 |
Flag denoting disabling of CSI.
Referenced by XCsi2Tx_Activate().
#define XCSI2TX_ENABLE 1 |
Flag denoting enabling of CSI.
Referenced by XCsi2Tx_Activate().
#define XCSI2TX_GIER_GIE_MASK 0x00000001 |
Global Interrupt Enable bit.
#define XCSI2TX_GIER_GIE_SHIFT 0 |
Shift bits for Global Interrupt Enable.
#define XCSI2TX_GIER_OFFSET 0x00000020 |
Global Interrupt Register.
Referenced by XCsi2Tx_Configure(), and XCsi2Tx_SelfTest().
#define XCSI2TX_GIER_RESET 0 |
Disable the Global Interrupts.
#define XCSI2TX_GIER_SET 1 |
Enable the Global Interrupts.
#define XCSI2TX_GSP_MASK 0x00000001F |
Number of GSPs can be safely written to GSP FIFO, before it goes full.
#define XCSI2TX_H_ |
Prevent circular inclusions by using protection macros.
#define XCSI2TX_HW_H_ |
Prevent circular inclusions by using protection macros.
#define XCSI2TX_IER_OFFSET 0x00000028 |
Interrupt Enable Register.
Referenced by XCsi2Tx_GetIntrEnable(), XCsi2Tx_IntrDisable(), XCsi2Tx_IntrEnable(), and XCsi2Tx_SelfTest().
#define XCSI2TX_ISR_OFFSET 0x00000024 |
Interrupt Status Register.
Referenced by XCsi2Tx_GetIntrStatus(), XCsi2Tx_InterruptClear(), and XCsi2Tx_SelfTest().
#define XCSI2TX_LINE_COUNT_VC0 0x00000040 |
Line Count for VC0.
Referenced by XCsi2Tx_GetLineCountForVC(), and XCsi2Tx_SetLineCountForVC().
#define XCSI2TX_LINE_COUNT_VC1 0x00000044 |
Line Count for VC1.
#define XCSI2TX_LINE_COUNT_VC2 0x00000048 |
Line Count for VC2.
#define XCSI2TX_LINE_COUNT_VC3 0x0000004C |
Line Count for VC3.
#define XCSI2TX_MAX_LANES 4 |
Max Lanes supported by CSI.
#define XCSI2TX_MAX_VC 4 |
Max number of Virtual Channels.
Referenced by XCsi2Tx_GetLineCountForVC(), and XCsi2Tx_SetLineCountForVC().
#define XCSI2TX_SPKTR_OFFSET 0x00000030 |
Generic Short Packet Entry.
Referenced by XCsi2Tx_GetShortPacket(), and XCsi2Tx_SelfTest().
#define XCSITX_LCSTAT_VC0_IER_MASK (1<<8) |
Line Count Status for VC0 IER.
Referenced by XCsi2Tx_IntrDisable(), and XCsi2Tx_IntrEnable().
#define XCSITX_LCSTAT_VC0_IER_OFFSET (8) |
Line Count Status for VC0 IER Offset.
#define XCSITX_LCSTAT_VC0_ISR_MASK (0x3<<8) |
Line Count Status for VC0 ISR.
Referenced by XCsi2Tx_InterruptClear(), and XCsi2Tx_IntrHandler().
#define XCSITX_LCSTAT_VC0_ISR_OFFSET (8) |
Line Count Status for VC0 ISR Offset.
Referenced by XCsi2Tx_IntrHandler().
#define XCSITX_LCSTAT_VC1_IER_MASK (1<<10) |
Line Count Status for VC1 IER.
Referenced by XCsi2Tx_IntrDisable(), and XCsi2Tx_IntrEnable().
#define XCSITX_LCSTAT_VC1_IER_OFFSET (10) |
Line Count Status for VC1 IER Offset.
#define XCSITX_LCSTAT_VC1_ISR_MASK (0x3<<10) |
Line Count Status for VC1 ISR.
Referenced by XCsi2Tx_InterruptClear(), and XCsi2Tx_IntrHandler().
#define XCSITX_LCSTAT_VC1_ISR_OFFSET (10) |
Line Count Status for VC1 ISR Offset.
Referenced by XCsi2Tx_IntrHandler().
#define XCSITX_LCSTAT_VC2_IER_MASK (1<<12) |
Line Count Status for VC2 IER.
Referenced by XCsi2Tx_IntrDisable(), and XCsi2Tx_IntrEnable().
#define XCSITX_LCSTAT_VC2_IER_OFFSET (12) |
Line Count Status for VC2 IER Offset.
#define XCSITX_LCSTAT_VC2_ISR_MASK (0x3<<12) |
Line Count Status for VC2 ISR.
Referenced by XCsi2Tx_InterruptClear(), and XCsi2Tx_IntrHandler().
#define XCSITX_LCSTAT_VC2_ISR_OFFSET (12) |
Line Count Status for VC2 ISR Offset.
Referenced by XCsi2Tx_IntrHandler().
#define XCSITX_LCSTAT_VC3_IER_MASK (1<<14) |
Line Count Status for VC3 IER.
Referenced by XCsi2Tx_IntrDisable(), and XCsi2Tx_IntrEnable().
#define XCSITX_LCSTAT_VC3_IER_OFFSET (14) |
Line Count Status for VC3 IER Offset.
#define XCSITX_LCSTAT_VC3_ISR_MASK (0x3<<14) |
Line Count Status for VC3 ISR.
Referenced by XCsi2Tx_InterruptClear(), and XCsi2Tx_IntrHandler().
#define XCSITX_LCSTAT_VC3_ISR_OFFSET (14) |
Line Count Status for VC3 ISR Offset.
Referenced by XCsi2Tx_IntrHandler().
typedef void(* XCsi2Tx_CallBack)(void *CallBackRef, u32 Mask) |
Callback type for all interrupts defined.
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 XCSI2TX_ISR_*_MASK constants defined in xcsi_hw.h. |
enum XCsi2Tx_LCStatus |
u32 Csi2TxSelfTestExample | ( | u32 | DeviceId | ) |
This function checks if the Max Lane count from the generated file matches the value present in the protocol configuration register.
DeviceId | is the CSI2Tx Controller Device id. |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx_CfgInitialize(), XCsi2Tx_LookupConfig(), and XCsi2Tx_SelfTest().
Referenced by main().
int main | ( | ) |
The entry point for this example.
It invokes the example function, and reports the execution status.
None. |
References Csi2TxSelfTestExample().
u32 XCsi2Tx_Activate | ( | XCsi2Tx * | InstancePtr, |
u8 | Flag | ||
) |
Thsi function will enable/disable the IP Core to start processing.
InstancePtr | is the XCsi2Tx instance to operate on. |
Flag | will be used to indicate Enable or Disable action |
References XCsi2Tx::IsReady, XCSI2TX_DISABLE, and XCSI2TX_ENABLE.
u32 XCsi2Tx_CfgInitialize | ( | XCsi2Tx * | InstancePtr, |
XCsi2Tx_Config * | CfgPtr, | ||
UINTPTR | EffectiveAddr | ||
) |
Initialize the XCsi2Tx instance provided by the caller based on the given Config structure.
InstancePtr | is the XCsi2Tx instance to operate on. |
CfgPtr | is the device configuration structure containing information about a specific CSI. |
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 XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx::DPhyUlpsCallBack, XCsi2Tx::GSPFIFOCallBack, XCsi2Tx::IncorrectLaneCallBack, and XCsi2Tx::IsReady.
Referenced by Csi2TxSelfTestExample().
u32 XCsi2Tx_Configure | ( | XCsi2Tx * | InstancePtr | ) |
This function will configure the core with proper number of Active Lanes.
InstancePtr | is the XCsi2Tx instance to operate on. |
References XCsi2Tx::ActiveLanes, XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx::IsReady, XCsi2Tx_GetIntrEnable(), XCSI2TX_GIER_OFFSET, XCsi2Tx_IntrEnable(), XCsi2Tx_IsActiveLaneCountValid(), and XCsi2Tx_Reset().
u32 XCsi2Tx_GetIntrEnable | ( | XCsi2Tx * | InstancePtr | ) |
This function will get the interrupt mask set (enabled) in the CSI2 Tx core.
InstancePtr | is the XCsi instance to operate on |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, and XCSI2TX_IER_OFFSET.
Referenced by XCsi2Tx_Configure().
u32 XCsi2Tx_GetIntrStatus | ( | XCsi2Tx * | InstancePtr | ) |
This function will get the list of interrupts pending in the Interrupt Status Register of the CSI2 Tx core.
InstancePtr | is the XCsi instance to operate on |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, and XCSI2TX_ISR_OFFSET.
Referenced by XCsi2Tx_IntrHandler().
u32 XCsi2Tx_GetLineCountForVC | ( | XCsi2Tx * | 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 XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx_Config::FEGenEnabled, XCSI2TX_LINE_COUNT_VC0, and XCSI2TX_MAX_VC.
void XCsi2Tx_GetShortPacket | ( | XCsi2Tx * | InstancePtr, |
XCsi2Tx_SPktData * | ShortPacketStruct | ||
) |
This function will get the short packet received in the FIFO from the Generic Short Packet Register and fill up the structure passed from caller.
InstancePtr | is the XCsi2Tx instance to operate on |
ShortPacketStruct | is going to be filled up by this function and returned to the caller. |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx_SPktData::Data, XCsi2Tx_SPktData::DataType, XCsi2Tx_SPktData::VirtualChannel, and XCSI2TX_SPKTR_OFFSET.
void XCsi2Tx_InterruptClear | ( | XCsi2Tx * | InstancePtr, |
u32 | Mask | ||
) |
This function will clear the interrupts set in the Interrupt Status Register of the CSI2 Tx core.
InstancePtr | is the XCsi instance to operate on |
Mask | is Interrupt Mask with bits set for corresponding interrupt to be cleared in the Interrupt Status register |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx_Config::FEGenEnabled, XCSI2TX_ISR_OFFSET, XCSITX_LCSTAT_VC0_ISR_MASK, XCSITX_LCSTAT_VC1_ISR_MASK, XCSITX_LCSTAT_VC2_ISR_MASK, and XCSITX_LCSTAT_VC3_ISR_MASK.
Referenced by XCsi2Tx_IntrHandler().
void XCsi2Tx_IntrDisable | ( | XCsi2Tx * | InstancePtr, |
u32 | Mask | ||
) |
This function will disable the interrupts present in the interrupt mask passed onto the function.
InstancePtr | is the XCsi instance to operate on |
Mask | is the interrupt mask which need to be enabled in core |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx_Config::FEGenEnabled, XCSI2TX_IER_OFFSET, XCSITX_LCSTAT_VC0_IER_MASK, XCSITX_LCSTAT_VC1_IER_MASK, XCSITX_LCSTAT_VC2_IER_MASK, and XCSITX_LCSTAT_VC3_IER_MASK.
void XCsi2Tx_IntrEnable | ( | XCsi2Tx * | InstancePtr, |
u32 | Mask | ||
) |
This function will enable the interrupts present in the interrupt mask passed onto the function.
InstancePtr | is the XCsi instance to operate on |
Mask | is the interrupt mask which need to be enabled in core |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx_Config::FEGenEnabled, XCSI2TX_IER_OFFSET, XCSITX_LCSTAT_VC0_IER_MASK, XCSITX_LCSTAT_VC1_IER_MASK, XCSITX_LCSTAT_VC2_IER_MASK, and XCSITX_LCSTAT_VC3_IER_MASK.
Referenced by XCsi2Tx_Configure().
void XCsi2Tx_IntrHandler | ( | void * | InstancePtr | ) |
This function is the interrupt handler for the CSI2 Tx core.
This handler reads the pending interrupt from the Interrupt Status register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in Interrupt Enable register, and finally clears the interrupts.
The application is responsible for connecting this function to the interrupt system. Application beyond this core is also responsible for providing callbacks to handle interrupts and installing the callbacks using XCsi2Tx_SetCallBack() during initialization phase.
InstancePtr | is a pointer to the XCsi2Tx core instance. |
References XCsi2Tx::Config, XCsi2Tx::DPhyUlpsCallBack, XCsi2Tx::DPhyUlpsRef, XCsi2Tx_Config::FEGenEnabled, XCsi2Tx::GSPFIFOCallBack, XCsi2Tx::IncorrectLaneCallBack, XCsi2Tx::IncorrectLaneRef, XCsi2Tx::IsReady, XCsi2Tx::LCErrVC0Ref, XCsi2Tx::LCErrVC1Ref, XCsi2Tx::LCErrVC2Ref, XCsi2Tx::LCErrVC3Ref, XCsi2Tx::LineBufferRef, XCsi2Tx::UnderrunPixelRef, XCsi2Tx_GetIntrStatus(), XCsi2Tx_InterruptClear(), XCSI2TX_LC_LESS_LINES, XCSI2TX_LC_MORE_LINES, XCSITX_LCSTAT_VC0_ISR_MASK, XCSITX_LCSTAT_VC0_ISR_OFFSET, XCSITX_LCSTAT_VC1_ISR_MASK, XCSITX_LCSTAT_VC1_ISR_OFFSET, XCSITX_LCSTAT_VC2_ISR_MASK, XCSITX_LCSTAT_VC2_ISR_OFFSET, XCSITX_LCSTAT_VC3_ISR_MASK, and XCSITX_LCSTAT_VC3_ISR_OFFSET.
u8 XCsi2Tx_IsActiveLaneCountValid | ( | XCsi2Tx * | InstancePtr, |
u8 | ActiveLanesCount | ||
) |
This function checks the validity of the active lanes parameter.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
ActiveLanesCount | is the lane count to check if valid. |
References XCsi2Tx::Config, and XCsi2Tx_Config::MaxLanesPresent.
Referenced by XCsi2Tx_Configure().
XCsi2Tx_Config * XCsi2Tx_LookupConfig | ( | u32 | DeviceId | ) |
Look up the hardware configuration for a device instance.
DeviceId | is the unique device ID of the device to lookup for |
Referenced by Csi2TxSelfTestExample().
u32 XCsi2Tx_Reset | ( | XCsi2Tx * | InstancePtr | ) |
This function will do a reset of the IP.
This will reset the values of all regiters except Core Config and Protocol Config registers.
InstancePtr | is the XCsi2Tx instance to operate on. |
Referenced by XCsi2Tx_Configure(), and XCsi2Tx_SelfTest().
u32 XCsi2Tx_SelfTest | ( | XCsi2Tx * | InstancePtr | ) |
Runs a self-test on the driver/device.
This test checks if the LaneCount present in register matches the one from the generated file.
InstancePtr | is a pointer to the XCsi instance. |
References XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx::IsReady, XCsi2Tx_Config::MaxLanesPresent, XCSI2TX_CCR_OFFSET, XCSI2TX_GIER_OFFSET, XCSI2TX_IER_OFFSET, XCSI2TX_ISR_OFFSET, XCsi2Tx_Reset(), and XCSI2TX_SPKTR_OFFSET.
Referenced by Csi2TxSelfTestExample().
int XCsi2Tx_SetCallBack | ( | XCsi2Tx * | InstancePtr, |
u32 | HandleType, | ||
void * | Callbackfunc, | ||
void * | Callbackref | ||
) |
This routine installs an asynchronous callback function for the given HandlerType:
HandlerType Callback Function Type ---------------------------- -------------------------------------------- (XCSI2TX_HANDLER_WRG_LANE) IncorrectLaneCallBack (XCSI2TX_HANDLER_GSPFIFO_FULL) GSPFIFOCallBack (XCSI2TX_HANDLER_ULPS) DPhyUlpsCallBack (XCSI2TX_HANDLER_LINEBUF_FULL) LineBufferCallBack (XCSI2TX_HANDLER_WRG_DATATYPE) WrgDataTypeCallBack (XCSI2TX_HANDLER_UNDERRUN_PIXEL) UnderrunPixelCallBack (XCSI2TX_HANDLER_LCERRVC0) LineCountErrVC0 (XCSI2TX_HANDLER_LCERRVC1) LineCountErrVC1 (XCSI2TX_HANDLER_LCERRVC2) LineCountErrVC2 (XCSI2TX_HANDLER_LCERRVC3) LineCountErrVC3
InstancePtr | is the XCsi2Tx instance to operate on |
HandleType | 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 XCsi2Tx::DPhyUlpsCallBack, XCsi2Tx::DPhyUlpsRef, XCsi2Tx::GSPFIFOCallBack, XCsi2Tx::IncorrectLaneCallBack, XCsi2Tx::IncorrectLaneRef, XCsi2Tx::IsReady, XCsi2Tx::LCErrVC0Ref, XCsi2Tx::LCErrVC1Ref, XCsi2Tx::LCErrVC2Ref, XCsi2Tx::LCErrVC3Ref, XCsi2Tx::LineBufferRef, and XCsi2Tx::UnderrunPixelRef.
u32 XCsi2Tx_SetLineCountForVC | ( | XCsi2Tx * | 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 XCsi2Tx_Config::BaseAddr, XCsi2Tx::Config, XCsi2Tx_Config::FEGenEnabled, XCSI2TX_CCR_OFFSET, XCSI2TX_LINE_COUNT_VC0, and XCSI2TX_MAX_VC.