|
NVIDIA DRIVE OS Linux SDK API Reference
|
6.0.3 Release
|
Go to the documentation of this file.
7 #ifndef DEVBLK_CDI_I2C_H
8 #define DEVBLK_CDI_I2C_H
36 #define I2C_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
116 const uint8_t addrLength,
117 const uint8_t dataLength
161 const uint16_t address,
188 const uint16_t address,
216 const uint16_t address,
244 const uint16_t address,
345 const uint16_t address,
346 const uint16_t dataLength,
uint16_t data
The value of an I2C register; Valid range: [0, UINT16_MAX].
uint16_t address
The address of an I2C register; Valid range: [0, UINT16_MAX].
Defines the I2C register table to read from the device.
const DevBlkCDII2CReg * regs
An array of DevBlkCDII2CReg structures, of length numRegs.
NvMediaStatus DevBlkCDII2CPgmrDumpArray(DevBlkCDII2CPgmr i2cProgrammer, const DevBlkCDII2CRegList *regList)
Dumps the values for all registers in the register table.
NvMediaStatus DevBlkCDII2CPgmrReadArray(DevBlkCDII2CPgmr i2cProgrammer, const DevBlkCDII2CRegListWritable *regList)
Performs read operation for a register table.
uint32_t numRegs
The number of registers in the regs array; Valid range: [0, UINT32_MAX].
NvMediaStatus DevBlkCDII2CPgmrReadUint16(DevBlkCDII2CPgmr i2cProgrammer, const uint16_t address, uint16_t *data)
Reads 16-bit data from an I2C register.
uint32_t delayUsec
The number of microseconds to delay between this read/write operation and the next one; Valid range: ...
NvMediaStatus DevBlkCDII2CPgmrWriteArray(DevBlkCDII2CPgmr i2cProgrammer, const DevBlkCDII2CRegList *regList)
Performs write operation for a register table.
void * DevBlkCDII2CPgmr
An opaque handle for an I2C programmer object.
NVIDIA Device Block Interface: Camera Device Interface (CDI)
DevBlkCDII2CReg * regs
An array of DevBlkCDII2CReg structures, of length numRegs.
NvMediaStatus
Defines all possible error codes.
NvMediaStatus DevBlkCDII2CPgmrReadUint8(DevBlkCDII2CPgmr i2cProgrammer, const uint16_t address, uint8_t *data)
Reads 8-bit data from an I2C register.
DevBlkCDII2CPgmr DevBlkCDII2CPgmrCreate(DevBlkCDIDevice *handle, const uint8_t addrLength, const uint8_t dataLength)
Creates an I2C Programmer to read/write I2C registers of a device.
NvMediaStatus DevBlkCDII2CPgmrWriteUint8(DevBlkCDII2CPgmr i2cProgrammer, const uint16_t address, const uint8_t data)
Writes 8-bit data to an I2C register.
NvMediaStatus DevBlkCDII2CPgmrWriteUint16(DevBlkCDII2CPgmr i2cProgrammer, const uint16_t address, const uint16_t data)
Writes 16-bit data to an I2C register.
NvMediaStatus DevBlkCDII2CPgmrReadBlock(DevBlkCDII2CPgmr i2cProgrammer, const uint16_t address, const uint16_t dataLength, uint8_t *dataBuff)
Reads a block of data from I2C device.
NvMediaStatus DevBlkCDII2CPgmrDebugLogControl(DevBlkCDII2CPgmr i2cProgrammer, NvMediaBool enable)
Enables debug logs for I2C Programmer.
Holds the handle for an DevBlkCDIDevice object.
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
void DevBlkCDII2CPgmrDestroy(DevBlkCDII2CPgmr i2cProgrammer)
Destroys an I2C Programmer.
Defines the I2C register table to write to the device.
Defines the I2C address/data pair and an optional delay.
uint32_t numRegs
The number of registers in the regs array; Valid range: [0, UINT32_MAX].