NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

The NvMediaISCDeviceDriver object defines the device driver.

The core NvMediaISC calls the driver when the client calls the related public NvMediaICS function.

Before the client can create an NvMediaISCRootDevice object (a device), it must provide a device driver. When the client creates the driver, it specifies pointers to support functions, which are the functions that the device driver can call. The client defines the support functions with the NvMediaISCSupportFunctions struct.

The NvMediaISCDeviceDriver object contains data fields and function pointers.

Data Fields
  • deviceName The name of the device. This is a null-terminated string.
Function Pointers

The NvMediaISCSupportFunctions structure holds the following functions:

Here is a sample device driver implementation that writes one register upon calling the NvMediaISCSetDefaults function.

Header File
#include <nvmedia_isc.h>
NvMediaISCDeviceDriver *GetSAMPLEDEVICEDriver(void);

Source File

#include "isc_sample_device.h"
DriverCreate(
NvMediaISCSupportFunctions *supportFunctions,
void *clientContext)
{
if(!handle || !supportFunctions)
// Save support function pointer
s_supportFuncs = supportFunctions;
// Can be used to maintain local device context
// or can be set to NULL.
*handle = NULL;
}
SetDefaults(
{
NvMediaStatus status;
uint32_t data[2];
data[0] = 0x12; // Register address
data[1] = 0x32; // Register data
// Write data to register
status = s_supportFuncs->Write(
transaction, // transaction
2, // dataLength
data); // data
return status;
}
static NvMediaISCDeviceDriver deviceDriver = {
.deviceName = "Sample Sensor Device",
.DriverCreate = DriverCreate,
.SetDefaults = SetDefaults
};
GetSAMPLEDEVICEDriver(void)
{
// Return device driver descriptor structure
return &deviceDriver;
}

Data Structures

struct  NvMediaISCSupportFunctions
 Holds the support functions that the device driver can call. More...
 
struct  NvMediaISCDeviceDriver
 Holds device driver data. More...
 

Enumerations

enum  NvMediaISCSensorAttrType {
  NVMEDIA_ISC_SENSOR_ATTR_FUSE_ID,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_MIN,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_ET_MIN,
  NVMEDIA_ISC_SENSOR_ATTR_ET_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_ET_FINE,
  NVMEDIA_ISC_SENSOR_ATTR_ET_STEP,
  NVMEDIA_ISC_SENSOR_ATTR_HDR_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_FACTOR,
  NVMEDIA_ISC_SENSOR_ATTR_QE_PIXEL_RATIO,
  NVMEDIA_ISC_SENSOR_ATTR_FRAME_RATE,
  NVMEDIA_ISC_SENSOR_ATTR_NUM_EXPOSURES
}
 ISC sensor attributes. More...
 

Enumeration Type Documentation

ISC sensor attributes.

Enumerator
NVMEDIA_ISC_SENSOR_ATTR_FUSE_ID 

Unique ID per instance of camera module.

Data type: char[32]

NVMEDIA_ISC_SENSOR_ATTR_GAIN_MIN 

Mininum possible gain values.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_GAIN_MAX 

Maximum possible gain values.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_MIN 

Minimum possible exposure time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_MAX 

Maximum possible exposure time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_FINE 

Fine integration time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_STEP 

Exposure time step values in seconds.

Data type: double[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_HDR_MAX 

Maximum possible HDR ratio value.

Data type: uint32_t

NVMEDIA_ISC_SENSOR_ATTR_GAIN_FACTOR 

Gain factor between the exposures.

If non zero, possible factors are 1, x, 1/x. Data type: float_t

NVMEDIA_ISC_SENSOR_ATTR_QE_PIXEL_RATIO 

Quantum efficiency ratio in split pixel HDR sensor technology.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_FRAME_RATE 

Frames per second.

Data type: float_t

NVMEDIA_ISC_SENSOR_ATTR_NUM_EXPOSURES 

Active number of exposures.

Data type: uint32_t

Definition at line 431 of file nvmedia_isc.h.