PDK API Guide for J721E
csirx.h File Reference

Introduction

CSIRX Driver API/interface file.

Requirement: NA

Go to the source code of this file.

Data Structures

struct  Csirx_ChCfg
 Structure containing Channels configurations. More...
 
struct  Csirx_InstCfg
 Structure containing csirx module initialization arguments. More...
 
struct  Csirx_CreateParams
 Capture driver create arguments, used when calling Fvid2_create(). Structure containing Streams configurations. More...
 
struct  Csirx_InitParams
 Capture driver create arguments, used when calling Fvid2_create(). Structure containing Streams configurations. More...
 
struct  Csirx_CreateStatus
 Capture driver create status. Returned after calling Fvid2_create(). More...
 
struct  Csirx_InstStatus
 Capture status structure used to get the current status. More...
 

Macros

#define CSIRX_CAPT_DRV_ID   (FVID2_CSIRX_DRV_BASE + 0x00000000U)
 CSIRX capture driver ID used at the time of FVID2 create. More...
 
#define IOCTL_CSIRX_GET_INST_STATUS   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0000U)
 Get capture status IOCTL. More...
 
#define IOCTL_CSIRX_PRINT_DEBUG_LOGS   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0100U)
 Print capture debug logs. More...
 
#define IOCTL_CSIRX_SET_DPHY_CONFIG   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0200U)
 Set CSIRX D-PHY Configuration Parameters. More...
 
#define IOCTL_CSIRX_REGISTER_EVENT   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0300U)
 Register CSIRX events. More...
 
#define IOCTL_CSIRX_UNREGISTER_EVENT   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0400U)
 Un-register CSIRX events. More...
 
#define IOCTL_CSIRX_GET_INST_CH_NUM   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0500U)
 Get number of channels created for a given driver instance. More...
 
#define IOCTL_CSIRX_CH_START   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0600U)
 Start a channel for capture. This will start up PSIL thread, UDMA channel. More...
 
#define IOCTL_CSIRX_CH_STOP   (FVID2_CSIRX_DRV_IOCTL_BASE + 0x0700U)
 Stop a channel for capture. This will stop a PSIL thread, UDMA channel. More...
 
#define CSIRX_BUF_ALIGNMENT   (UDMA_CACHELINE_ALIGNMENT)
 Buffer memory alignment with cache line size. More...
 
CSIRX Channel Type

Id for CSIRX Channel/Stream type.

#define CSIRX_CH_TYPE_CAPT   ((uint32_t) 0x0U)
 Stream type: capture mode, frames will captured to internal memory or DDR. More...
 
#define CSIRX_CH_TYPE_OTF   ((uint32_t) 0x1U)
 Stream type: OTF mode, frames will be forwarded to Video Port/VISS. More...
 
#define CSIRX_CH_TYPE_LPBK   ((uint32_t) 0x2U)
 Stream type: Loopback mode, frames will be forwarded to CSI Tx trans PADs. More...
 

Functions

int32_t Csirx_init (const Csirx_InitParams *initParams)
 CSIRX Driver Init function. More...
 
int32_t Csirx_deInit (void)
 CSIRX Driver de-Init function. More...
 
static void Csirx_initParamsInit (Csirx_InitParams *initPrms)
 Csirx_InitParams structure init function. More...
 
static void Csirx_createParamsInit (Csirx_CreateParams *createPrms)
 Csirx_CreateParams structure init function. More...
 
static void Csirx_chCfgInit (Csirx_ChCfg *chCfg)
 Csirx_ChCfg structure init function. More...
 
static void Csirx_instCfgInit (Csirx_InstCfg *instCfg)
 Csirx_InstCfg structure init function. More...
 
static void Csirx_instStatusInit (Csirx_InstStatus *status)
 Csirx_InstStatus structure init function. More...
 

Macro Definition Documentation

◆ CSIRX_CH_TYPE_CAPT

#define CSIRX_CH_TYPE_CAPT   ((uint32_t) 0x0U)

Stream type: capture mode, frames will captured to internal memory or DDR.

◆ CSIRX_CH_TYPE_OTF

#define CSIRX_CH_TYPE_OTF   ((uint32_t) 0x1U)

Stream type: OTF mode, frames will be forwarded to Video Port/VISS.

◆ CSIRX_CH_TYPE_LPBK

#define CSIRX_CH_TYPE_LPBK   ((uint32_t) 0x2U)

Stream type: Loopback mode, frames will be forwarded to CSI Tx trans PADs.

◆ CSIRX_BUF_ALIGNMENT

#define CSIRX_BUF_ALIGNMENT   (UDMA_CACHELINE_ALIGNMENT)

Buffer memory alignment with cache line size.

Function Documentation

◆ Csirx_init()

int32_t Csirx_init ( const Csirx_InitParams initParams)

CSIRX Driver Init function.

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

◆ Csirx_deInit()

int32_t Csirx_deInit ( void  )

CSIRX Driver de-Init function.

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

◆ Csirx_initParamsInit()

static void Csirx_initParamsInit ( Csirx_InitParams initPrms)
inlinestatic

Csirx_InitParams structure init function.

Parameters
initPrms[IN] Pointer to Csirx_InitParams structure.

◆ Csirx_createParamsInit()

static void Csirx_createParamsInit ( Csirx_CreateParams createPrms)
inlinestatic

Csirx_CreateParams structure init function.

Parameters
createPrms[IN] Pointer to Csirx_CreateParams structure.

◆ Csirx_chCfgInit()

static void Csirx_chCfgInit ( Csirx_ChCfg chCfg)
inlinestatic

Csirx_ChCfg structure init function.

Parameters
chCfg[IN] Pointer to Csirx_ChCfg structure.

◆ Csirx_instCfgInit()

static void Csirx_instCfgInit ( Csirx_InstCfg instCfg)
inlinestatic

Csirx_InstCfg structure init function.

Parameters
instCfg[IN] Pointer to Csirx_InstCfg structure.

◆ Csirx_instStatusInit()

static void Csirx_instStatusInit ( Csirx_InstStatus status)
inlinestatic

Csirx_InstStatus structure init function.

Parameters
status[IN] Pointer to Csirx_InstStatus structure.