Holds device driver data.
Definition at line 741 of file devblk_cdi.h.
Data Fields | |
const char * | deviceName |
Holds the device name. More... | |
uint32_t | regLength |
Holds the target device offset length in bytes. More... | |
uint32_t | dataLength |
Holds the target device data length in bytes. More... | |
NvMediaStatus(* | DriverCreate )(DevBlkCDIDevice *handle, void const *clientContext) |
Holds the function that creates device driver. More... | |
NvMediaStatus(* | DriverDestroy )(DevBlkCDIDevice *handle) |
Holds the function that destroy the driver for a device. More... | |
NvMediaStatus(* | SetSensorControls )(DevBlkCDIDevice const *handle, const struct DevBlkCDISensorControl *sensorControl, const size_t sensrCtrlStructSize) |
Holds the function that sets sensor controls. More... | |
NvMediaStatus(* | ParseTopEmbDataInfo )(DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *topEmbDataChunk, const size_t topChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize) |
Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer. More... | |
NvMediaStatus(* | ParseBotEmbDataInfo )(DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *botEmbDataChunk, const size_t botChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize) |
Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer. More... | |
NvMediaStatus(* | GetSensorAttributes )(DevBlkCDIDevice const *handle, struct DevBlkCDISensorAttributes *sensorAttr, const size_t sensorAttrStructSize) |
Holds the function that gets sensor attributes. More... | |
NvMediaStatus(* | GetModuleConfig )(DevBlkCDIDevice *handle, struct DevBlkCDIModuleConfig *moduleConfig) |
Holds the function that gets module configuration. More... | |
NvMediaStatus(* | SetSensorCharMode )(DevBlkCDIDevice *handle, uint8_t expNo) |
Holds the function that sets sensor in characterization mode. More... | |
NvMediaStatus(* | ReadRegister )(DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff) |
Holds the function that reads a block from an I2C device. More... | |
NvMediaStatus(* | WriteRegister )(DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t const *dataBuff) |
Holds the function that writes a block to an I2C device. More... | |
uint32_t DevBlkCDIDeviceDriver::dataLength |
Holds the target device data length in bytes.
Definition at line 747 of file devblk_cdi.h.
const char* DevBlkCDIDeviceDriver::deviceName |
Holds the device name.
Definition at line 743 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::DriverCreate) (DevBlkCDIDevice *handle, void const *clientContext) |
Holds the function that creates device driver.
The implementation should allocate and initialize the device driver internal handle and module configuration. DriverCreate
should not communicate with the device, only set up driver data structures.
[in] | handle | A pointer to the device to use; Valid value: [non-NULL]. |
[in] | clientContext | A non-NULL pointer to the device context to use when driver is created. If NULL, the default context will be used in driver. |
NVMEDIA_STATUS_OK | when all internal structures are initialized successfully. |
NVMEDIA_STATUS_OUT_OF_MEMORY | when an internal allocation fails. (Failure) |
NVMEDIA_STATUS_BAD_PARAMETER | when handle is NULL. (Failure) |
NVMEDIA_STATUS_* | May return a different NvMedia error status for implementation-defined reasons. (Failure) |
Usage considerations
Definition at line 782 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::DriverDestroy) (DevBlkCDIDevice *handle) |
Holds the function that destroy the driver for a device.
The implementation should release all resources allocated in DriverCreate(). It should not communicate with the device.
[in] | handle | A pointer to the device to use; Valid value: [non-NULL]. |
NVMEDIA_STATUS_OK | when all resources are successfully released. |
NVMEDIA_STATUS_* | May return an NvMedia error status for implementation-defined reasons. (Failure) |
Usage considerations
Definition at line 814 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::GetModuleConfig) (DevBlkCDIDevice *handle, struct DevBlkCDIModuleConfig *moduleConfig) |
Holds the function that gets module configuration.
Usage considerations
Definition at line 1025 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::GetSensorAttributes) (DevBlkCDIDevice const *handle, struct DevBlkCDISensorAttributes *sensorAttr, const size_t sensorAttrStructSize) |
Holds the function that gets sensor attributes.
The sensorAttrStructSize
parameter can be used to check if the application was built against the same version of CDI as the driver.
The function should fill out the provided DevBlkCDISensorAttributes completely.
[in] | handle | A pointer to the device to use; Valid value: [non-NULL]. |
[in] | sensorAttr | A pointer to the DevBlkCDISensorAttributes structure. Valid value: [non-NULL]. |
[in] | sensorAttrStructSize | Size of the sensorAttr structure, in bytes; The size must > 0. |
NVMEDIA_STATUS_OK | on success. |
NVMEDIA_STATUS_* | if parameter validation or another internal operation fails. (Failure) |
Usage considerations
Definition at line 1000 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::ParseBotEmbDataInfo) (DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *botEmbDataChunk, const size_t botChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize) |
Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer.
DevBlkCDIParseBotEmbDataInfo() invokes this function.
The embeddedDataChunkStructSize
and dataInfoStructSize
parameters can be used to validate that the client is using the same CDI version as the driver.
The provided botEmbDataChunk
provides access to the bottom data chunks. These should be used to fill out the information requested by embeddedDataInfo
, as supported by the sensor. Unsupported elements should have their corresponding valid
flag set to false. For example, if a given sensor doesn't support reporting temperature information, embeddedDataInfo->sensorTempInfo->tempValid
should be set to false after this function runs.
[in] | handle | A pointer to the device to use; Valid value: [non-NULL. |
[in] | botEmbDataChunk | A pointer to the top sensor embedded data DevBlkCDIEmbeddedDataChunk structure. Valid value: [non-NULL]. |
[in] | botChunkStructSize | Size of the botEmbDataChunk in bytes; The size must > 0. |
[in] | embeddedDataInfo | A pointer to the buffer that holds the parsed embedded data info. Valid value: [non-NULL]. |
[in] | dataInfoStructSize | Size of the embeddedDataInfo structure, in bytes; The size must > 0. |
NVMEDIA_STATUS_OK | when all operations succeed. |
NVMEDIA_STATUS_* | May return an NvMedia error status for implementation-defined reasons. (Failure) |
Usage considerations
Definition at line 960 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::ParseTopEmbDataInfo) (DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *topEmbDataChunk, const size_t topChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize) |
Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer.
DevBlkCDIParseTopEmbDataInfo() invokes this function.
The embeddedDataChunkStructSize
and dataInfoStructSize
parameters can be used to validate that the client is using the same CDI version as the driver.
The provided topEmbDataChunk
provides access to the top data chunks. These should be used to fill out the information requested by embeddedDataInfo
, as supported by the sensor. Unsupported elements should have their corresponding valid
flag set to false. For example, if a given sensor doesn't support reporting temperature information, embeddedDataInfo->sensorTempInfo->tempValid
should be set to false after this function runs.
[in] | handle | A pointer to the device to use; Valid value: [non-NULL. |
[in] | topEmbDataChunk | A pointer to the top sensor embedded data DevBlkCDIEmbeddedDataChunk structure. Valid value: [non-NULL]. |
[in] | topChunkStructSize | Size of the topEmbDataChunk in bytes; The size must > 0. |
[in] | embeddedDataInfo | A pointer to the buffer that holds the parsed embedded data info. Valid value: [non-NULL]. |
[in] | dataInfoStructSize | Size of the embeddedDataInfo structure, in bytes; The size must > 0. |
NVMEDIA_STATUS_OK | when all operations succeed. |
NVMEDIA_STATUS_* | May return an NvMedia error status for implementation-defined reasons. (Failure) |
Usage considerations
Definition at line 905 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::ReadRegister) (DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff) |
Holds the function that reads a block from an I2C device.
Usage considerations
Definition at line 1109 of file devblk_cdi.h.
uint32_t DevBlkCDIDeviceDriver::regLength |
Holds the target device offset length in bytes.
Definition at line 745 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::SetSensorCharMode) (DevBlkCDIDevice *handle, uint8_t expNo) |
Holds the function that sets sensor in characterization mode.
This function is invoked by DevBlkCDISetSensorCharMode function call.
Usage considerations
Definition at line 1084 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::SetSensorControls) (DevBlkCDIDevice const *handle, const struct DevBlkCDISensorControl *sensorControl, const size_t sensrCtrlStructSize) |
Holds the function that sets sensor controls.
This function is invoked by DevBlkCDISetSensorControls function call.
sensrCtrlStructSize
can be used to determine the API version, as its size will change on every revision. Drivers should use this to ensure they are used only with compatible clients.
The implementation may receive a DevBlkCDISensorControl
which requests more sensor contexts than are supported by the driver or sensor, in which case an error should be returned and no sensor configuration modified.
If supported by the device, drivers should set hold acquire during device configuration.
For each requested sensor context i
, each of the following parameters should be programmed:
exposureControl[i].expTimeValid
is setexposureControl[i].gainValid
is setwbControl[i].wbValid
is setIf frameReportControl.frameReportValid
is set, frame reporting should be enabled with given configuration.
[in] | handle | A pointer to the device to use; Valid value: [non-NULL]. |
[in] | sensorControl | A pointer to a sensor control structure for device; Valid value: [non-NULL]. |
[in] | sensrCtrlStructSize | Size of the sensorControl structure; The size must > 0. |
NVMEDIA_STATUS_OK | when all operations succeed. |
NVMEDIA_STATUS_* | May return an NvMedia error status for implementation-defined reasons. (Failure) |
Usage considerations
Definition at line 865 of file devblk_cdi.h.
NvMediaStatus(* DevBlkCDIDeviceDriver::WriteRegister) (DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t const *dataBuff) |
Holds the function that writes a block to an I2C device.
Usage considerations
Definition at line 1136 of file devblk_cdi.h.