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 | |
NvMediaISCDevice * | NvMediaISCDeviceCreate (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 struct NvMediaISCAttrRange NvMediaISCAttrRange |
Holds the range of a sensor attribute.
typedef struct NvMediaISCCRC NvMediaISCCRC |
Holds the sensor CRC structure.
typedef struct NvMediaISCEmbeddedDataChunk NvMediaISCEmbeddedDataChunk |
typedef struct NvMediaISCEmbeddedDataInfo NvMediaISCEmbeddedDataInfo |
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).
typedef struct NvMediaISCExposure NvMediaISCExposure |
Holds sensor exposure information.
typedef struct NvMediaISCFrameReport NvMediaISCFrameReport |
Holds the sensor report frame report structure.
typedef struct NvMediaISCFrameSeqNum NvMediaISCFrameSeqNum |
Holds the sensor frame sequence number structure.
typedef struct NvMediaISCPWL NvMediaISCPWL |
Holds the sensor companding piecewise linear (PWL) structure.
typedef struct NvMediaISCSensorAttributes NvMediaISCSensorAttributes |
Holds the sensor attributes.
typedef struct NvMediaISCSensorControl NvMediaISCSensorControl |
Holds the sensor control structure.
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.
typedef struct NvMediaISCTemperature NvMediaISCTemperature |
Holds the sensor temperature structure.
typedef struct NvMediaISCWhiteBalance NvMediaISCWhiteBalance |
Holds the sensor white balance gain structure.
NvMediaISCDevice* NvMediaISCDeviceCreate | ( | NvMediaISCRootDevice * | rootDevice, |
uint32_t * | deviceAddressList, | ||
uint32_t | numDevices, | ||
NvMediaISCDeviceDriver * | deviceDriver, | ||
NvMediaISCAdvancedConfig * | advancedConfig | ||
) |
Creates an NvMediaISCDevice object.
[in] | rootDevice | A pointer to the root device that you created with NvMediaISCRootDeviceCreate(). |
[in] | deviceAddressList | The list of I2C device addresses corresponding to this NvMediaISCDevice object |
[in] | numDevices | The number of I2C addresses in the above list |
[in] | deviceDriver | The driver structure that defines the behavior of the device. |
[in] | advancedConfig | Advanced configuration. |
void NvMediaISCDeviceDestroy | ( | NvMediaISCDevice * | device | ) |
Destroys the object that describes an ISC device.
[in] | device | Handle 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.
[in] | device | A pointer to the device to use. |
[in] | deviceIndex | Index of the subdevice to use |
[in] | regLength | Length of the register address, in bytes. |
[in] | regData | A pointer to the register address. |
[in] | dataLength | Length of data to be read, in bytes. |
[out] | data | A pointer to the location for storing the read data. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more pointer parameters was NULL. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that the device driver does not support this functionality. |
NVMEDIA_STATUS_ERROR | indicates 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.
[in] | device | A pointer to the device to use. |
[in] | deviceIndex | Index of the subdevice to use. |
[in] | dataLength | Length of data to be written, in bytes. |
[in] | data | A pointer to data to be written to device via I2C. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more pointer parameters was NULL. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that the device driver does not support this functionality. |
NVMEDIA_STATUS_ERROR | indicates 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.
[in] | device | A pointer to the device to use. |
[out] | sensorAttr | A pointer a sensor attributes structure. |
[in] | sensorAttrStructSize | Size of the sensorAttr structure. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more pointer parameters was NULL. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that the device driver does not support this functionality. |
NVMEDIA_STATUS_ERROR | indicates 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.
[in] | device | A pointer to the device to use. |
[in] | embeddedTopDataChunk | A pointer to the top sensor embedded data chunk structure. |
[in] | embeddedBotDataChunk | A pointer to the bottom sensor embedded data chunk structure. |
[in] | embeddedDataChunkStructSize | Size of the embeddedTopDataChunk and embeddedBottomDataChunk structures, in bytes. |
[out] | embeddedDataInfo | A pointer to the embedded data parsed info structure. |
[in] | dataInfoStructSize | Size of the embeddedDataInfo structure, in bytes. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more pointer parameters was NULL or invalid. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that the device driver does not support this functionality. |
NVMEDIA_STATUS_ERROR | indicates 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.
[in] | device | A pointer to the sensor control device in use. |
[in] | sensorControl | A pointer to a sensor control structure for device. |
[in] | sensrCtrlStructSize | Size of the sensorControl structure. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more pointer parameters was NULL. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that the device driver does not support this functionality. |
NVMEDIA_STATUS_ERROR | indicates that any other error occurred. |