mipicsiss
Xilinx SDK Drivers API Documentation
pipeline_program.c File Reference

Overview

This file contains the video pipe line configuration, Sensor configuration and its programming as per the resolution selected by user.

Please see pipeline_program.h for more details.

MODIFICATION HISTORY:
Ver   Who    Date     Changes


1.00 pg 12/07/17 Initial release.

Functions

int SensorWriteData (u16 ByteCount)
 This function writes a buffer of data to the IIC serial sensor. More...
 
int SensorReadData (u8 *BufferPtr, u16 ByteCount)
 This function reads data from the IIC serial Camera Sensor into a specified buffer. More...
 
int SetupCameraSensor (void)
 This function setup Camera sensor programming wrt resolution selected. More...
 
int InitIIC (void)
 This function initializes IIC controller and gets config parameters. More...
 
void SetupIICIntrHandlers (void)
 This function sets send, receive and error handlers for IIC interrupts. More...
 
void ConfigCSC (u32 width, u32 height)
 This function programs colour space converter with the given width and height. More...
 
void ConfigGammaLut (u32 width, u32 height)
 This function programs colour space converter with the given width and height. More...
 
void ConfigDemosaic (u32 width, u32 height)
 This function programs colour space converter with the given width and height. More...
 
void DisableImageProcessingPipe (void)
 This function disables Demosaic, GammaLut and VProcSS IPs. More...
 
void InitImageProcessingPipe (void)
 This function Initializes Image Processing blocks wrt to selected resolution. More...
 
void EnableCSI (void)
 This function enables MIPI CSI IP. More...
 
void DisableCSI (void)
 This function disables MIPI CSI IP. More...
 
int StartSensor (void)
 This function starts camera sensor to transmit captured video. More...
 
void InitVDMA (XAxiVdma *VdmaInst, u32 bpp, u32 FrameBase)
 This function initializes the vdma IP for give configuration. More...
 
void InitCSC2TPG_Vdma (void)
 This function provides information to program vdma wrt BPC. More...
 
void InitVprocSs_Scaler (int count)
 This function initializes and configures VProcSS IP for scalar mode with the given input and output width and height values. More...
 
void ResetVprocSs_Scaler (void)
 This function resets VProcSS_scalar IP. More...
 
void EnableDSI (void)
 This function enables MIPI DSI SS. More...
 
void DisableDSI (void)
 This function disables MIPI DSI SS. More...
 
void InitDSI (void)
 This function programs MIPI DSI SS with the required timing paramters. More...
 
u32 SetupDSI (void)
 This function initializes MIPI DSI SS and gets config parameters. More...
 
void SelectDSIOuptut (void)
 This function programs GPIO to 0 to select tready from MIPI DSI SS. More...
 
void SelectHDMIOutput (void)
 This function programs GPIO to '1' to select tready from HDMI. More...
 
void DisableScaler (void)
 This function stops VProc_SS scalar IP. More...
 
void DisableTPGVdma (void)
 This function stops VDMA IP transactions. More...
 
u32 InitTreadyGpio (void)
 This function initializes GPIO IP for tready selection and gets config parameters. More...
 
u32 InitializeCsiRxSs (void)
 This function initializes MIPI CSI2 RX SS and gets config parameters. More...
 
XVidC_ColorDepth GetColorDepth (u32 CsiDataFormat)
 This function returns selected colour depth of MIPI CSI2 RX SS. More...
 
void SetColorDepth (void)
 This function sets colour depth value getting from MIPI CSI2 RX SS. More...
 
u32 InitializeVdma (void)
 This function initializes Axi VDMA IP and gets config parameters. More...
 
void PrintPipeConfig (void)
 This function prints the video pipeline information. More...
 

Function Documentation

void ConfigCSC ( u32  width,
u32  height 
)

This function programs colour space converter with the given width and height.

Parameters
widthis Hsize of a packet in pixels.
heightis number of lines of a packet.
Returns
None.
Note
None.

Referenced by InitImageProcessingPipe().

void ConfigDemosaic ( u32  width,
u32  height 
)

This function programs colour space converter with the given width and height.

Parameters
widthis Hsize of a packet in pixels.
heightis number of lines of a packet.
Returns
None.
Note
None.

Referenced by InitImageProcessingPipe().

void ConfigGammaLut ( u32  width,
u32  height 
)

This function programs colour space converter with the given width and height.

Parameters
widthis Hsize of a packet in pixels.
heightis number of lines of a packet.
Returns
None.
Note
None.

Referenced by InitImageProcessingPipe().

void DisableCSI ( void  )

This function disables MIPI CSI IP.

Returns
None.
Note
None.

References XCsiSs_Reset().

void DisableDSI ( void  )

This function disables MIPI DSI SS.

Returns
None.
Note
None.
void DisableImageProcessingPipe ( void  )

This function disables Demosaic, GammaLut and VProcSS IPs.

Returns
None.
Note
None.
void DisableScaler ( void  )

This function stops VProc_SS scalar IP.

Returns
None.
Note
None.
void DisableTPGVdma ( void  )

This function stops VDMA IP transactions.

Returns
None.
Note
None.
void EnableCSI ( void  )

This function enables MIPI CSI IP.

Returns
None.
Note
None.

References XCsiSs_Activate(), XCsiSs_Configure(), and XCsiSs_Reset().

void EnableDSI ( void  )

This function enables MIPI DSI SS.

Returns
None.
Note
None.
XVidC_ColorDepth GetColorDepth ( u32  CsiDataFormat)

This function returns selected colour depth of MIPI CSI2 RX SS.

Parameters
CsiDataFormatis video data format
Returns
ColorDepth returns colour depth value.
Note
None.

Referenced by SetColorDepth().

void InitCSC2TPG_Vdma ( void  )

This function provides information to program vdma wrt BPC.

Returns
None.
Note
None.

References InitVDMA().

Referenced by main().

void InitDSI ( void  )

This function programs MIPI DSI SS with the required timing paramters.

Returns
None.
Note
None.
u32 InitializeCsiRxSs ( void  )

This function initializes MIPI CSI2 RX SS and gets config parameters.

This function programs MIPI CSI SS with the required timing paramters.

Returns
XST_SUCCESS if successful or else XST_FAILURE.
Note
None.

References XCsiSs_Config::BaseAddr, XCsiSs_CfgInitialize(), and XCsiSs_LookupConfig().

u32 InitializeVdma ( void  )

This function initializes Axi VDMA IP and gets config parameters.

Returns
XST_SUCCESS if successful or else XST_FAILURE.
Note
None.

Referenced by main().

int InitIIC ( void  )

This function initializes IIC controller and gets config parameters.

This function writes, reads, and verifies the data to the IIC EEPROM.

Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.
void InitImageProcessingPipe ( void  )

This function Initializes Image Processing blocks wrt to selected resolution.

Returns
None.
Note
None.

References ConfigCSC(), ConfigDemosaic(), and ConfigGammaLut().

Referenced by main().

u32 InitTreadyGpio ( void  )

This function initializes GPIO IP for tready selection and gets config parameters.

Returns
XST_SUCCESS if successful or else XST_FAILURE.
Note
None.

Referenced by main().

void InitVDMA ( XAxiVdma *  VdmaInst,
u32  bpp,
u32  FrameBase 
)

This function initializes the vdma IP for give configuration.

Parameters
VdmaInstis the pointer to XAxiVdma instance
bppis the bits per pixel
FrameBaseis the address of the frame buffer
Returns
None.
Note
None.

Referenced by InitCSC2TPG_Vdma().

void InitVprocSs_Scaler ( int  count)

This function initializes and configures VProcSS IP for scalar mode with the given input and output width and height values.

Parameters
countis a flag value to initialize IP only once.
Returns
None.
Note
None.
void PrintPipeConfig ( void  )

This function prints the video pipeline information.

Returns
None.
Note
None.

Referenced by main().

void ResetVprocSs_Scaler ( void  )

This function resets VProcSS_scalar IP.

Returns
None.
Note
None.
void SelectDSIOuptut ( void  )

This function programs GPIO to 0 to select tready from MIPI DSI SS.

Returns
None.
Note
None.

Referenced by main().

void SelectHDMIOutput ( void  )

This function programs GPIO to '1' to select tready from HDMI.

Returns
None.
Note
None.

Referenced by main().

int SensorReadData ( u8 *  BufferPtr,
u16  ByteCount 
)

This function reads data from the IIC serial Camera Sensor into a specified buffer.

Parameters
BufferPtrcontains the address of the data buffer to be filled.
ByteCountcontains the number of bytes in the buffer to be read.
Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

References SensorWriteData().

Referenced by SetupCameraSensor().

int SensorWriteData ( u16  ByteCount)

This function writes a buffer of data to the IIC serial sensor.

Parameters
ByteCountis the number of bytes in the buffer to be written.
Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

Referenced by SensorReadData(), SetupCameraSensor(), and StartSensor().

void SetColorDepth ( void  )

This function sets colour depth value getting from MIPI CSI2 RX SS.

Returns
None.
Note
None.

References XCsiSs::Config, GetColorDepth(), and XCsiSs_Config::PixelFormat.

Referenced by main().

int SetupCameraSensor ( void  )

This function setup Camera sensor programming wrt resolution selected.

Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

References SensorReadData(), and SensorWriteData().

Referenced by main().

u32 SetupDSI ( void  )

This function initializes MIPI DSI SS and gets config parameters.

This function programs MIPI DSI SS with the required timing paramters.

Returns
None.
Note
None.
void SetupIICIntrHandlers ( void  )

This function sets send, receive and error handlers for IIC interrupts.

Returns
None.
Note
None.

References ReceiveHandler(), SendHandler(), and StatusHandler().

int StartSensor ( void  )

This function starts camera sensor to transmit captured video.

Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

References SensorWriteData().

Referenced by main().