NVIDIA DRIVE OS Linux SDK API Reference

5.1.9.0 Release

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

Detailed Description

An ISC device represents a device that is attached or linked to the root I2C port.

Data Structures

struct  NvMediaISCAdvancedConfig
 Holds the description of the target I2C device. More...
 
struct  NvMediaISCAttrRange
 Holds the range of a sensor attribute. More...
 
struct  NvMediaISCSensorAttributes
 Holds the sensor attributes. More...
 
struct  NvMediaISCExposure
 Holds sensor exposure information. More...
 
struct  NvMediaISCWhiteBalance
 Holds the sensor white balance gain structure. More...
 
struct  NvMediaISCFrameReport
 Holds the sensor report frame report structure. More...
 
struct  NvMediaISCPWL
 Holds the sensor companding piecewise linear (PWL) structure. More...
 
struct  NvMediaISCTemperature
 Holds the sensor temperature structure. More...
 
struct  NvMediaISCCRC
 Holds the sensor CRC structure. More...
 
struct  NvMediaISCFrameSeqNum
 Holds the sensor frame sequence number structure. More...
 
struct  NvMediaISCSensorControl
 Holds the sensor control structure. More...
 
struct  NvMediaISCEmbeddedDataInfo
 Holds the sensor embedded data parsed info structure. More...
 
struct  NvMediaISCEmbeddedDataChunk
 

Typedefs

typedef struct NvMediaISCAttrRange NvMediaISCAttrRange
 Holds the range of a sensor attribute. More...
 
typedef struct
NvMediaISCSensorAttributes 
NvMediaISCSensorAttributes
 Holds the sensor attributes. More...
 
typedef struct NvMediaISCExposure NvMediaISCExposure
 Holds sensor exposure information. More...
 
typedef struct
NvMediaISCWhiteBalance 
NvMediaISCWhiteBalance
 Holds the sensor white balance gain structure. More...
 
typedef struct
NvMediaISCFrameReport 
NvMediaISCFrameReport
 Holds the sensor report frame report structure. More...
 
typedef struct NvMediaISCPWL NvMediaISCPWL
 Holds the sensor companding piecewise linear (PWL) structure. More...
 
typedef struct
NvMediaISCTemperature 
NvMediaISCTemperature
 Holds the sensor temperature structure. More...
 
typedef struct NvMediaISCCRC NvMediaISCCRC
 Holds the sensor CRC structure. More...
 
typedef struct
NvMediaISCFrameSeqNum 
NvMediaISCFrameSeqNum
 Holds the sensor frame sequence number structure. More...
 
typedef struct
NvMediaISCSensorControl 
NvMediaISCSensorControl
 Holds the sensor control structure. More...
 
typedef struct
NvMediaISCEmbeddedDataInfo 
NvMediaISCEmbeddedDataInfo
 Holds the sensor embedded data parsed info structure. More...
 
typedef struct
NvMediaISCEmbeddedDataChunk 
NvMediaISCEmbeddedDataChunk
 

Functions

NvMediaISCDeviceNvMediaISCDeviceCreate (NvMediaISCRootDevice *rootDevice, uint32_t *deviceAddressList, uint32_t numDevices, NvMediaISCDeviceDriver *deviceDriver, NvMediaISCAdvancedConfig *advancedConfig)
 Creates an NvMediaISCDevice object. More...
 
void NvMediaISCDeviceDestroy (NvMediaISCDevice *device)
 Destroys the object that describes an ISC device. More...
 
NvMediaStatus NvMediaISCDeviceRead (NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t regLength, uint8_t *regData, uint32_t dataLength, uint8_t *data)
 Performs a read operation over I2C. More...
 
NvMediaStatus NvMediaISCDeviceWrite (NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t dataLength, const uint8_t *data)
 Performs a write operation over I2C. More...
 
NvMediaStatus NvMediaISCGetSensorAttributes (NvMediaISCDevice *device, NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
 Gets the sensor attributes. More...
 
NvMediaStatus NvMediaISCSetSensorControls (NvMediaISCDevice *device, const NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)
 Sets sensor control parameters. More...
 
NvMediaStatus NvMediaISCParseEmbedDataInfo (NvMediaISCDevice *device, const NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t embeddedDataChunkStructSize, NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
 Parses sensor embedded data info and provides sensor image settings information for the captured frame. More...
 

Typedef Documentation

Holds the range of a sensor attribute.

typedef struct NvMediaISCCRC NvMediaISCCRC

Holds the sensor CRC structure.

Holds the sensor embedded data parsed info structure.

The sensor driver can selectively activate or deactivate any of the parsed info blocks, depending on whether the sensor supports it.

To activate a sensor info block, the sensor driver must set the info block's valid flag to TRUE and populate the parsed information corresponding to the block. To disable a sensor info block, it must set the valid flag to FALSE.

For example, if a sensor supports only exposure, white balance and CRC info, the sensor driver activates only the sensorExpInfo, sensorWBInfo, and sensorCRCInfo blocks (it sets their valid flags to TRUE) and disables all of the others (it sets their valid flags to FALSE).

Holds sensor exposure information.

Holds the sensor report frame report structure.

Holds the sensor frame sequence number structure.

typedef struct NvMediaISCPWL NvMediaISCPWL

Holds the sensor companding piecewise linear (PWL) structure.

Holds the sensor attributes.

Holds the sensor control structure.

Note

To activate a sensor control block, set the corresponding valid flag to TRUE and populate the control settings to be set.

To disable a sensor control block, set the corresponding valid flag to FALSE.

For example, to activate the white balance control block, set the wbValid flag in the wbControl structure to TRUE and populate the white balance settings to be programmed. To disable white balance control block, set the wbValid flag to FALSE.

Holds the sensor temperature structure.

Holds the sensor white balance gain structure.

Function Documentation

NvMediaISCDevice* NvMediaISCDeviceCreate ( NvMediaISCRootDevice rootDevice,
uint32_t *  deviceAddressList,
uint32_t  numDevices,
NvMediaISCDeviceDriver deviceDriver,
NvMediaISCAdvancedConfig advancedConfig 
)

Creates an NvMediaISCDevice object.

Parameters
[in]rootDeviceA pointer to the root device that you created with NvMediaISCRootDeviceCreate().
[in]deviceAddressListThe list of I2C device addresses corresponding to this NvMediaISCDevice object
[in]numDevicesThe number of I2C addresses in the above list
[in]deviceDriverThe driver structure that defines the behavior of the device.
[in]advancedConfigAdvanced configuration.
Returns
device The new device's handle or NULL if unsuccessful.
void NvMediaISCDeviceDestroy ( NvMediaISCDevice device)

Destroys the object that describes an ISC device.

Parameters
[in]deviceHandle to the device to destroy.
NvMediaStatus NvMediaISCDeviceRead ( NvMediaISCDevice device,
uint32_t  deviceIndex,
uint32_t  regLength,
uint8_t *  regData,
uint32_t  dataLength,
uint8_t *  data 
)

Performs a read operation over I2C.

For safety use cases, application software shall call NvMediaISCDeviceRead() 2 times to read the contents of the same register location. If a register value is not expected to change, return values of the two reads should match.

Parameters
[in]deviceA pointer to the device to use.
[in]deviceIndexIndex of the subdevice to use
[in]regLengthLength of the register address, in bytes.
[in]regDataA pointer to the register address.
[in]dataLengthLength of data to be read, in bytes.
[out]dataA pointer to the location for storing the read data.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCDeviceWrite ( NvMediaISCDevice device,
uint32_t  deviceIndex,
uint32_t  dataLength,
const uint8_t *  data 
)

Performs a write operation over I2C.

For safety use cases, application software shall call NvMediaISCDeviceRead() after calling NvMediaISCDeviceWrite() to verify whether the write operation was successful. If a register value is not expected to change, read value should match the value written.

Parameters
[in]deviceA pointer to the device to use.
[in]deviceIndexIndex of the subdevice to use.
[in]dataLengthLength of data to be written, in bytes.
[in]dataA pointer to data to be written to device via I2C.
Returns
NvMediaStatus The completion status of the operation.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCGetSensorAttributes ( NvMediaISCDevice device,
NvMediaISCSensorAttributes sensorAttr,
const size_t  sensorAttrStructSize 
)

Gets the sensor attributes.

Sensor attributes are static properties like sensor name, exposure-gain ranges supported, and number of active exposures.

Parameters
[in]deviceA pointer to the device to use.
[out]sensorAttrA pointer a sensor attributes structure.
[in]sensorAttrStructSizeSize of the sensorAttr structure.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCParseEmbedDataInfo ( NvMediaISCDevice device,
const NvMediaISCEmbeddedDataChunk embeddedTopDataChunk,
const NvMediaISCEmbeddedDataChunk embeddedBotDataChunk,
const size_t  embeddedDataChunkStructSize,
NvMediaISCEmbeddedDataInfo embeddedDataInfo,
const size_t  dataInfoStructSize 
)

Parses sensor embedded data info and provides sensor image settings information for the captured frame.

This function can be used to retrieve sensor image settings like exposure, gain, and white balance information applied to the frame.

Parameters
[in]deviceA pointer to the device to use.
[in]embeddedTopDataChunkA pointer to the top sensor embedded data chunk structure.
[in]embeddedBotDataChunkA pointer to the bottom sensor embedded data chunk structure.
[in]embeddedDataChunkStructSizeSize of the embeddedTopDataChunk and embeddedBottomDataChunk structures, in bytes.
[out]embeddedDataInfoA pointer to the embedded data parsed info structure.
[in]dataInfoStructSizeSize of the embeddedDataInfo structure, in bytes.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL or invalid.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCSetSensorControls ( NvMediaISCDevice device,
const NvMediaISCSensorControl sensorControl,
const size_t  sensrCtrlStructSize 
)

Sets sensor control parameters.

This function enables you to control sensor image settings like exposure time, sensor gain, and white balance gain. All parameters provided to this function are applied together at a frame boundary through ISC's "group hold" functionality, if supported by the sensor.

Note
This function invokes the device driver function specified by the call to SetSensorControls().
Parameters
[in]deviceA pointer to the sensor control device in use.
[in]sensorControlA pointer to a sensor control structure for device.
[in]sensrCtrlStructSizeSize of the sensorControl structure.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.