PDK API Guide for J721E
csitx.h File Reference

Introduction

CSITX Driver API/interface file.

Requirement: NA

Go to the source code of this file.

Data Structures

struct  Csitx_ChCfg
 Structure containing Channels configurations. More...
 
struct  Csitx_InstCfg
 Structure containing csitx module initialization arguments. More...
 
struct  Csitx_CreateParams
 Capture driver create arguments, used when calling Fvid2_create(). Structure containing Streams configurations. More...
 
struct  Csitx_InitParams
 Capture driver create arguments, used when calling Fvid2_create(). Structure containing Streams configurations. More...
 
struct  Csitx_CreateStatus
 Capture driver create status. Returned after calling Fvid2_create(). More...
 
struct  Csitx_InstStatus
 Capture status structure used to get the current status. More...
 

Macros

#define CSITX_TX_DRV_ID   (FVID2_CSITX_DRV_BASE + 0x00000000U)
 Application API calling sequence: More...
 
#define IOCTL_CSITX_GET_INST_STATUS   (FVID2_CSITX_DRV_IOCTL_BASE + 0x0000U)
 Get transmit status IOCTL. More...
 
#define IOCTL_CSITX_PRINT_DEBUG_LOGS   (FVID2_CSITX_DRV_IOCTL_BASE + 0x0100U)
 Print transmit debug logs. More...
 
#define CSITX_BUF_ALIGNMENT   (UDMA_CACHELINE_ALIGNMENT)
 Buffer memory alignment with cache line size. More...
 
CSITX Channel Type

Id for CSITX Channel/Stream type.

#define CSITX_CH_TYPE_TX   ((uint32_t) 0x0U)
 Stream type: transmit mode, frames will transmitted from internal memory or DDR. More...
 
#define CSITX_CH_TYPE_COLORBAR   ((uint32_t) 0x1U)
 Stream type: Color Bar mode, Pre-defined color bar pattern is sent out through CSI interface. More...
 
#define CSITX_CH_TYPE_LPBK   ((uint32_t) 0x2U)
 Stream type: Loopback mode, frames are accepted through CSI Tx trans PADs and will sent out. More...
 

Functions

int32_t Csitx_init (const Csitx_InitParams *initParams)
 CSITX Driver Init function. More...
 
int32_t Csitx_deInit (void)
 CSITX Driver de-Init function. More...
 
void Csitx_initParamsInit (Csitx_InitParams *initPrms)
 Csitx_InitParams structure init function. More...
 
void Csitx_createParamsInit (Csitx_CreateParams *createPrms)
 Csitx_CreateParams structure init function. More...
 
void Csitx_chCfgInit (Csitx_ChCfg *chCfg)
 Csitx_ChCfg structure init function. More...
 
void Csitx_instCfgInit (Csitx_InstCfg *instCfg)
 Csitx_InstCfg structure init function. More...
 
void Csitx_instStatusInit (Csitx_InstStatus *status)
 Csitx_InstStatus structure init function. More...
 

Macro Definition Documentation

◆ CSITX_CH_TYPE_TX

#define CSITX_CH_TYPE_TX   ((uint32_t) 0x0U)

Stream type: transmit mode, frames will transmitted from internal memory or DDR.

◆ CSITX_CH_TYPE_COLORBAR

#define CSITX_CH_TYPE_COLORBAR   ((uint32_t) 0x1U)

Stream type: Color Bar mode, Pre-defined color bar pattern is sent out through CSI interface.

◆ CSITX_CH_TYPE_LPBK

#define CSITX_CH_TYPE_LPBK   ((uint32_t) 0x2U)

Stream type: Loopback mode, frames are accepted through CSI Tx trans PADs and will sent out.

◆ CSITX_BUF_ALIGNMENT

#define CSITX_BUF_ALIGNMENT   (UDMA_CACHELINE_ALIGNMENT)

Buffer memory alignment with cache line size.

Function Documentation

◆ Csitx_init()

int32_t Csitx_init ( const Csitx_InitParams initParams)

CSITX Driver Init function.

Parameters
initParams[IN] Pointer to Csitx_InitParams structure.
Returns
status CSITX Initialization status. 'FVID2_SOK' is successful.

◆ Csitx_deInit()

int32_t Csitx_deInit ( void  )

CSITX Driver de-Init function.

Returns
status CSITX Initialization status. 'FVID2_SOK' is successful.

◆ Csitx_initParamsInit()

void Csitx_initParamsInit ( Csitx_InitParams initPrms)

Csitx_InitParams structure init function.

Parameters
initPrms[IN] Pointer to Csitx_InitParams structure.

◆ Csitx_createParamsInit()

void Csitx_createParamsInit ( Csitx_CreateParams createPrms)

Csitx_CreateParams structure init function.

Parameters
createPrms[IN] Pointer to Csitx_CreateParams structure.

Note: If given 'createPrms.instCfg.dphyCfg.laneBandSpeed' does no match with pre-defined configurations, this API will default the DPHY parameters for 800 Mbps. Application should change the lane speed (if needed) prior to calling 'Fvid2_create()'. Pre-defined configurations are supported for following lane-speeds:

  1. CSITX_LANE_BAND_SPEED_770_TO_870_MBPS
  2. CSITX_LANE_BAND_SPEED_1000_TO_1200_MBPS
  3. CSITX_LANE_BAND_SPEED_1400_TO_1600_MBPS
  4. CSITX_LANE_BAND_SPEED_2200_TO_2500_MBPS

◆ Csitx_chCfgInit()

void Csitx_chCfgInit ( Csitx_ChCfg chCfg)

Csitx_ChCfg structure init function.

Parameters
chCfg[IN] Pointer to Csitx_ChCfg structure.

◆ Csitx_instCfgInit()

void Csitx_instCfgInit ( Csitx_InstCfg instCfg)

Csitx_InstCfg structure init function.

Parameters
instCfg[IN] Pointer to Csitx_InstCfg structure.

◆ Csitx_instStatusInit()

void Csitx_instStatusInit ( Csitx_InstStatus status)

Csitx_InstStatus structure init function.

Parameters
status[IN] Pointer to Csitx_InstStatus structure.