|
NVIDIA DRIVE OS Linux SDK API Reference
|
6.0.3 Release
|
Go to the documentation of this file.
18 #include "nvmedia_core.h"
20 #include "NvSIPLCDICommon.h"
55 #define DEVBLK_CDI_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 CDI_RDEV_CFG(csi, i2c) (((uint32_t)(csi) << (uint32_t)RDEV_CFG_I2C_BITS) | (i2c))
86 #define CDI_RDEV_CFG_EX(csi, i2c, disPwrCtrl) \
88 ((uint32_t)(csi & 0xffU) << (uint32_t)RDEV_CFG_I2C_BITS) | \
89 ((uint32_t)(disPwrCtrl & 1U) << (uint32_t)RDEV_CFG_SLV_BIT))
98 #define CDI_SLV_RDEV_CFG(csi, i2c) \
99 ((i2c) | ((uint32_t)(csi) << RDEV_CFG_I2C_BITS) | ((uint32_t)(1U) << RDEV_CFG_CSI_BITS))
104 struct DevBlkCDIEmbeddedDataChunk;
106 struct DevBlkCDIEmbeddedDataInfo;
108 struct DevBlkCDISensorAttributes;
157 #define DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS (8U)
179 #define DEVBLK_CDI_GPIO_LEVEL_LOW (1U)
180 #define DEVBLK_CDI_GPIO_LEVEL_HIGH (2U)
277 DevBlkCDIRootDeviceCreate(
280 const bool useCDIv2API
299 DevBlkCDIRootDeviceDestroy(
444 DevBlkCDIRootDeviceWaitForError(
503 DevBlkCDIRootDeviceAbortWaitForError(
634 void const* clientContext);
692 const size_t sensrCtrlStructSize);
736 const struct DevBlkCDIEmbeddedDataChunk *embeddedTopDataChunk,
737 const struct DevBlkCDIEmbeddedDataChunk *embeddedBotDataChunk,
738 const size_t dataChunkStructSize,
739 struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo,
740 const size_t dataInfoStructSize);
764 struct DevBlkCDISensorAttributes *sensorAttr,
765 const size_t sensorAttrStructSize);
826 uint32_t deviceIndex,
827 uint32_t registerNum,
840 uint32_t deviceIndex,
841 uint32_t registerNum,
843 uint8_t
const* dataBuff);
908 DevBlkCDIDeviceCreate(
910 uint32_t *deviceAddressList,
937 DevBlkCDIDeviceDestroy(
969 uint32_t deviceIndex,
1002 uint32_t deviceIndex,
1003 uint32_t dataLength,
1036 DevBlkCDISensorAttributes *sensorAttr,
1037 const size_t sensorAttrStructSize);
1075 DevBlkCDIWhiteBalance
wbControl[DEVBLK_CDI_MAX_SENSOR_CONTEXTS];
1119 const size_t sensrCtrlStructSize
1162 const DevBlkCDIEmbeddedDataChunk *embeddedTopDataChunk,
1163 const DevBlkCDIEmbeddedDataChunk *embeddedBotDataChunk,
1164 const size_t embeddedDataChunkStructSize,
1165 DevBlkCDIEmbeddedDataInfo *embeddedDataInfo,
1166 const size_t dataInfoStructSize);
1213 uint8_t *desPwrMethod);
1228 uint8_t *camPwrMethod);
uint32_t bufferSize
Holds the buffer size.
DevBlkCDIEmbeddedDataBuffer top
@ DEVBLK_CDI_GPIO_EVENT_ERROR_BACKEND
An error occurred in backend code, potentially resulting in permanent loss of functionality.
DevBlkCDIExposureControl exposureControl
Holds parsed exposure control.
Holds the sensor control structure.
@ DEVBLK_CDI_EXPOSURE_MODE_LONG
Specifies long exposure mode.
@ DEVBLK_CDI_EXPOSURE_MODE_SHORT
Specifies short exposure mode.
uint32_t frameSequenceNumber
Holds parsed frame counter.
@ DEVBLK_CDI_I2C_BUS_9
Specifies i2c-9.
@ DEVBLK_CDI_PWR_LINK_3
LINK 3 PWR.
NvMediaStatus DevBlkCDIGetCamPowerControlMethod(DevBlkCDIDevice *device, uint8_t *camPwrMethod)
Get the camera's power control method.
@ DEVBLK_CDI_SENSOR_ATTR_GAIN_MAX
Specifies maximum possible gain values.
uint32_t regLength
Holds the target device offset length in bytes.
DevBlkCDIExposureMode
Defines Exposure mode.
@ DEVBLK_CDI_EXPOSURE_MODE_VERY_SHORT
Specifies very short exposure mode.
@ DEVBLK_CDI_I2C_BUS_11
Specifies i2c-11.
NvMediaStatus DevBlkCDIDeviceWrite(DevBlkCDIDevice const *device, uint32_t deviceIndex, uint32_t dataLength, const uint8_t *data)
Performs a write operation over I2C.
@ DEVBLK_CDI_I2C_BUS_10
Specifies i2c-10.
NvMediaStatus DevBlkCDIRootDeviceSetGPIOPinLevel(DevBlkCDIRootDevice const *device, uint32_t gpio_idx, uint32_t level)
Sets the logic level of Tegra GPIO output pin associated with this root device.
Holds device driver data.
struct DevBlkCDIWBGainControl DevBlkCDIWBGainControl
Holds the white balance control structure.
@ DEVBLK_CDI_SENSOR_ATTR_ET_FINE
Specifies fine integration time values in seconds.
@ DEVBLK_CDI_SENSOR_ATTR_ET_STEP
Specifies exposure time step values in seconds.
Structure to hold array of CDAC GPIO indices.
struct DevBlkCDIExposureControl::@13 sensorGain[DEVBLK_CDI_EXPOSURE_MODE_MAX]
Holds sensor gain for each exposure mode.
uint32_t baseRegAddress
Holds the address of the first register.
uint8_t numSensorContexts
Holds the number of sensor contexts to activate.
NvMediaStatus DevBlkCDISetSensorCharMode(DevBlkCDIDevice *device, uint8_t expNo)
Set sensor in characterization mode.
DevBlkCDIWhiteBalance wbControl[DEVBLK_CDI_MAX_SENSOR_CONTEXTS]
Holds the sensor white balance settings to set for each context.
NvMediaStatus DevBlkCDIParseEmbedDataInfo(DevBlkCDIDevice *device, const DevBlkCDIEmbeddedDataChunk *embeddedTopDataChunk, const DevBlkCDIEmbeddedDataChunk *embeddedBotDataChunk, const size_t embeddedDataChunkStructSize, DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
Parses sensor embedded data info and provides sensor image settings information for the captured fram...
NvMediaStatus DevBlkCDIRootDeviceCheckAndClearIntr(DevBlkCDIRootDevice const *device, uint32_t gpio_idx)
Verifies that the level of a GPIO pin configured as an interrupt is at the correct pre-transition lev...
@ DEVBLK_CDI_I2C_SIMULATOR
Port SIMULATOR (20)
NvMediaStatus DevBlkCDIRootDeviceGetGPIOPinLevel(DevBlkCDIRootDevice const *device, uint32_t gpio_idx, uint32_t *level)
Queries the logic level of a Tegra GPIO input pin associated with the root device.
@ DEVBLK_CDI_I2C_BUS_7
Specifies i2c-7.
@ DEVBLK_CDI_GPIO_EVENT_INTR
An interrupt has occurred.
Holds the description of the target I2C device.
Holds the embedded data structure.
@ DEVBLK_CDI_I2C_BUS_3
Specifies i2c-3.
@ DEVBLK_CDI_GPIO_EVENT_ERROR_WAIT_CANCELLED
Waiting for an interrupt was unexpectedly cancelled, potentially resulting in permanent loss of funct...
DevBlkCDIEmbeddedDataBuffer bottom
NvMediaStatus DevBlkCDISetCameraPower(DevBlkCDIRootDevice const *device, uint8_t linkIndex, NvMediaBool enable)
Set the camera module power.
uint32_t size
Holds the data size.
@ DEVBLK_CDI_PWR_LINK_0
LINK 0 Power.
@ DEVBLK_CDI_GPIO_EVENT_ERROR_UNKNOWN
A generic error occurred, potentially resulting in permanent loss of functionality.
const char * cameraModuleConfigPass2
DevBlkCDISensorAttrType
CDI sensor attributes.
@ DEVBLK_CDI_GPIO_EVENT_ERROR_CDAC
An error occurred in CDAC code, potentially resulting in permanent loss of functionality.
@ DEVBLK_CDI_PWR_LINK_1
LINK 1 PWR.
@ DEVBLK_CDI_PWR_LINK_2
LINK 2 PWR.
Holds the embedded data buffer structure.
NvMediaStatus DevBlkCDIDeviceRead(DevBlkCDIDevice const *device, uint32_t deviceIndex, uint32_t regLength, uint8_t *regData, uint32_t dataLength, uint8_t *data)
Performs a read operation over I2C.
uint32_t count
Number of items in indices in gpio_idxs.
uint8_t * data
Holds the actual data.
DevBlkCDIExposure exposureControl[DEVBLK_CDI_MAX_SENSOR_CONTEXTS]
Holds the sensor exposure settings to set for each context.
DevBlkCDIPowerItems
CDI Power control items.
@ DEVBLK_CDI_SENSOR_ATTR_NUM_EXPOSURES
Specifies active number of exposures.
NvMediaStatus DevBlkCDIGetSensorAttributes(DevBlkCDIDevice *device, DevBlkCDISensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
Queries the sensor attributes.
@ DEVBLK_CDI_SENSOR_ATTR_ET_MAX
Specifies maximum possible exposure time values in seconds.
DevBlkCDIGpioEvent
CDI codes for CDAC GPIO Interrupt Events.
@ DEVBLK_CDI_I2C_BUS_1
Specifies i2c-1.
@ DEVBLK_CDI_SENSOR_ATTR_GAIN_FACTOR
Specifies gain factor between the exposures.
@ DEVBLK_CDI_I2C_BUS_5
Specifies i2c-5.
char cameraModuleCfgName[128]
Holds the camera module name.
struct DevBlkCDIModuleConfig DevBlkCDIModuleConfig
Holds the CDI Module ISP configuration.
struct DevBlkCDIWBGainControl::@14 wbGain[DEVBLK_CDI_EXPOSURE_MODE_MAX]
Holds white balance for each exposure mode in R Gr Gb B order.
NvMediaStatus DevBlkCDIGetDesPowerControlMethod(DevBlkCDIDevice *device, uint8_t *desPwrMethod)
Get the deserialzer's power control method.
NvMediaStatus
Defines all possible error codes.
@ DEVBLK_CDI_I2C_BUS_0
Specifies i2c-0.
Holds exposure control information.
struct DevBlkCDIExposureControl DevBlkCDIExposureControl
Holds exposure control information.
@ DEVBLK_CDI_SENSOR_ATTR_FRAME_RATE
Specifies frames per second.
NvMediaStatus DevBlkCDIGetModuleConfig(DevBlkCDIDevice *device, DevBlkCDIModuleConfig *moduleConfig)
Gets the Module ISP configuration.
@ DEVBLK_CDI_GPIO_EVENT_NOTHING
There is no pending event.
NvMediaStatus DevBlkCDIEnableErrorReport(DevBlkCDIRootDevice const *device)
Enable the error report.
NvMediaStatus DevBlkCDISetSensorControls(DevBlkCDIDevice *device, const DevBlkCDISensorControl *sensorControl, const size_t sensrCtrlStructSize)
Sets sensor control parameters.
NvMediaStatus DevBlkCDIRootDeviceGetGpioIntrEvent(DevBlkCDIRootDevice const *device, uint32_t gpio_idx, DevBlkCDIGpioEvent *event_code)
Queries CDAC for the latest event code of a GPIO pin.
struct DevBlkCDIEmbeddedData DevBlkCDIEmbeddedData
Holds the embedded data structure.
@ DEVBLK_CDI_SENSOR_ATTR_GAIN_MIN
Specifies minimum possible gain values.
@ DEVBLK_CDI_I2C_BUS_8
Specifies i2c-8.
struct DevBlkCDIExposureControl::@12 exposureTime[DEVBLK_CDI_EXPOSURE_MODE_MAX]
Holds exposure time for each exposure mode.
@ DEVBLK_CDI_SENSOR_ATTR_HDR_MAX
Specifies maximum possible HDR ratio value.
struct DevBlkCDISensorControl DevBlkCDISensorControl
Holds the sensor control structure.
@ DEVBLK_CDI_EXPOSURE_MODE_MAX
Specifies the exposure mode count.
void DevBlkCDIRootDevice
An opaque handle for an DevBlkCDIRootDevice object.
DevBlkCDI_I2CPort
Defines the I2C buses on the host hardware device.
Holds the handle for an DevBlkCDIDevice object.
Holds the CDI Module ISP configuration.
#define DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS
The maximum number of GPIOs supported on a CDI Root Device.
const char * cameraModuleConfigPass1
Holds the camera-specific configuration string.
const char * deviceName
Holds the device name.
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
@ DEVBLK_CDI_SENSOR_ATTR_FUSE_ID
Specifies a unique ID per instance of camera module.
@ DEVBLK_CDI_I2C_BUS_4
Specifies i2c-4.
DevBlkCDIWBGainControl wbControl
Holds parsed WB gains in R Gr Gb B order.
Holds the white balance control structure.
void * clientContext
Holds the client context.
@ DEVBLK_CDI_SENSOR_ATTR_QE_PIXEL_RATIO
Specifies sensitivity ratios for different exposures.
@ DEVBLK_CDI_PWR_AGGREGATOR
Aggregator Power.
@ DEVBLK_CDI_I2C_BUS_2
Specifies i2c-2.
void * deviceDriverHandle
@ DEVBLK_CDI_SENSOR_ATTR_ET_MIN
Specifies minimum possible exposure time values in seconds.
@ DEVBLK_CDI_I2C_BUS_6
Specifies i2c-6.
DevBlkCDIFrameReport frameReportControl
Holds the sensor frame report value to be programmed.
uint32_t dataLength
Holds the target device data length in bytes.