15 #ifndef _NVMEDIA_ISC_H
16 #define _NVMEDIA_ISC_H
48 #define NVMEDIA_ISC_VERSION_MAJOR 3
50 #define NVMEDIA_ISC_VERSION_MINOR 2
55 #define NVMEDIA_ISC_SIMULATOR_ADDRESS 0xFF1u
57 #define RDEV_CFG_I2C_BITS 8
59 #define RDEV_CFG_CSI_BITS (RDEV_CFG_I2C_BITS + 8)
61 #define RDEV_CFG_SLV_BIT (RDEV_CFG_CSI_BITS + 1)
68 #define ISC_RDEV_CFG(csi, i2c) (((uint32_t)(csi) << RDEV_CFG_I2C_BITS) | (i2c))
85 #define ISC_RDEV_CFG_EX(csi, i2c, disPwrCtrl) \
87 ((uint32_t)(csi & 0xffu) << RDEV_CFG_I2C_BITS) | \
88 ((uint32_t)(disPwrCtrl & 1u) << RDEV_CFG_SLV_BIT))
97 #define ISC_SLV_RDEV_CFG(csi, i2c) \
98 ((i2c) | ((uint32_t)(csi) << RDEV_CFG_I2C_BITS) | ((uint32_t)(1u) << RDEV_CFG_CSI_BITS))
107 #define ADV_CONFIG_INIT(cfg, ctx) \
109 memset(&cfg, 0, sizeof(cfg)); \
110 cfg.clientContext = (void *)(ctx); \
114 #define NVMEDIA_ISC_MAX_EXPOSURES (8u)
117 #define NVM_ISC_MAX_COLOR_COMPONENT (4u)
120 #define NVMEDIA_ISC_MAX_SENSOR_CONTEXTS (4u)
126 #define NVMEDIA_ISC_MAX_PWL_KNEEPOINTS (64u)
129 #define NVMEDIA_ISC_MAX_FRAME_REPORT_BYTES (4u)
132 #define NVMEDIA_ISC_MAX_NUM_TEMPERATURES (4u)
135 #define NVMEDIA_ISC_MAX_SENSOR_NAME_LENGTH (32u)
138 #define NVMEDIA_ISC_MAX_FUSE_ID_LENGTH (32u)
258 NvMediaISCRootDevice *
269 NvMediaISCRootDevice *device
288 NvMediaISCRootDevice *device
300 NvMediaISCRootDevice *device
446 void *clientContext);
571 const size_t sensrCtrlStructSize);
660 const size_t dataChunkStructSize,
662 const size_t dataInfoStructSize);
738 const size_t sensorAttrStructSize);
824 NvMediaISCRootDevice *rootDevice,
825 uint32_t *deviceAddressList,
863 uint32_t deviceIndex,
892 uint32_t deviceIndex,
1005 const size_t sensorAttrStructSize);
1238 const size_t sensrCtrlStructSize
1352 const size_t embeddedDataChunkStructSize,
1354 const size_t dataInfoStructSize);
1406 NvMediaISCRootDevice *device,
1429 NvMediaISCRootDevice *device,
1450 NvMediaISCRootDevice *device,
1467 NvMediaISCRootDevice *device,
1486 NvMediaISCRootDevice *device,
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.
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
struct NvMediaISCSensorControl NvMediaISCSensorControl
Holds the sensor control structure.
NvMediaStatus NvMediaISCGetVersion(NvMediaVersion *version)
Gets the version compatibility for the NvMedia ISC library.
struct NvMediaISCPWL NvMediaISCPWL
Holds the sensor companding piecewise linear (PWL) structure.
NvMediaStatus NvMediaISCGetSensorAttributes(NvMediaISCDevice *device, NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
Gets the sensor attributes.
void NvMediaISCRootDeviceDestroy(NvMediaISCRootDevice *device)
Destroys an NvMediaISCRootDevice object.
NvMediaStatus
Defines all possible error codes.
struct NvMediaISCExposure NvMediaISCExposure
Holds sensor exposure information.
NvMediaStatus NvMediaISCRootDeviceAbortWaitForError(NvMediaISCRootDevice *device)
Aborts a call to NvMediaISCRootDeviceWaitForError().
struct NvMediaISCEmbeddedDataChunk NvMediaISCEmbeddedDataChunk
void NvMediaISCDeviceDestroy(NvMediaISCDevice *device)
Destroys the object that describes an ISC device.
struct NvMediaISCFrameReport NvMediaISCFrameReport
Holds the sensor report frame report structure.
NvMediaISCRootDevice * NvMediaISCRootDeviceCreate(uint32_t portCfg)
Creates an NvMediaISCRootDevice object.
NvMediaStatus NvMediaISCRootDeviceWaitForError(NvMediaISCRootDevice *device)
Waits until an error condition is reported or NvMediaISCRootDeviceAbortWaitForError() is called...
NvMediaISC_I2CPort
Defines the I2C buses on the host hardware device.
struct NvMediaISCTemperature NvMediaISCTemperature
Holds the sensor temperature structure.
struct NvMediaISCFrameSeqNum NvMediaISCFrameSeqNum
Holds the sensor frame sequence number structure.
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.
struct NvMediaISCAttrRange NvMediaISCAttrRange
Holds the range of a sensor attribute.
struct NvMediaISCEmbeddedDataInfo NvMediaISCEmbeddedDataInfo
Holds the sensor embedded data parsed info structure.
NvMediaStatus NvMediaISCSetSensorControls(NvMediaISCDevice *device, const NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)
Sets sensor control parameters.
void NvMediaISCRootDevice
An opaque handle for an NvMediaISCRootDevice object.
struct NvMediaISCCRC NvMediaISCCRC
Holds the sensor CRC structure.
struct NvMediaISCSensorAttributes NvMediaISCSensorAttributes
Holds the sensor attributes.
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 fram...
NvMediaStatus NvMediaISCDeviceWrite(NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t dataLength, const uint8_t *data)
Performs a write operation over I2C.