Manage DevBlkCDIRootDevice objects, which represent the root of the SIPL device block.
The DevBlkCDIRootDevice object manages an I2C port on the host hardware device.
| Data Structures | |
| struct | DevBlkCDIPowerControlInfo | 
| Structure to hold power control information.  More... | |
| struct | DevBlkImageDesc | 
| Structure to describe a RAW image buffer.  More... | |
| struct | DevBlkCDIGPIOIndices | 
| Structure to hold array of CAMGPIO indices.  More... | |
| Macros | |
| #define | DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS (16U) | 
| The maximum number of GPIOs supported on a CDI Root Device.  More... | |
| #define | MAX_POWER_LINKS_PER_BLOCK (4U) | 
| The maximum number of power links per device block.  More... | |
| Typedefs | |
| typedef void | DevBlkCDIRootDevice | 
| An opaque handle for an DevBlkCDIRootDevice object.  More... | |
| Enumerations | |
| enum | DevBlkCDI_I2CPort { DEVBLK_CDI_I2C_BUS_0 = 0, DEVBLK_CDI_I2C_BUS_1 = 1, DEVBLK_CDI_I2C_BUS_2 = 2, DEVBLK_CDI_I2C_BUS_3 = 3, DEVBLK_CDI_I2C_BUS_4 = 4, DEVBLK_CDI_I2C_BUS_5 = 5, DEVBLK_CDI_I2C_BUS_6 = 6, DEVBLK_CDI_I2C_BUS_7 = 7, DEVBLK_CDI_I2C_BUS_8 = 8, DEVBLK_CDI_I2C_BUS_9 = 9, DEVBLK_CDI_I2C_BUS_10 = 10, DEVBLK_CDI_I2C_BUS_11 = 11, DEVBLK_CDI_I2C_BUS_12 = 12, DEVBLK_CDI_I2C_BUS_13 = 13, DEVBLK_CDI_I2C_BUS_14 = 14, DEVBLK_CDI_I2C_BUS_15 = 15, DEVBLK_CDI_I2C_BUS_16 = 16, DEVBLK_CDI_I2C_SIMULATOR = 255 } | 
| Defines the I2C buses on the host hardware device.  More... | |
| enum | DevBlkCDIGpioEvent { DEVBLK_CDI_GPIO_EVENT_INTR = 0, DEVBLK_CDI_GPIO_EVENT_INTR_TIMEOUT, DEVBLK_CDI_GPIO_EVENT_ERROR_CAMGPIO, DEVBLK_CDI_GPIO_EVENT_ERROR_BACKEND, DEVBLK_CDI_GPIO_EVENT_ERROR_UNKNOWN } | 
| CDI codes for CAMGPIO Interrupt Events.  More... | |
| Functions | |
| 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.  More... | |
| NvMediaStatus | DevBlkCDIRootDeviceCheckGPIOPinLevel (DevBlkCDIRootDevice const *device, uint32_t gpio_idx, uint32_t expected_level) | 
| Compares the logic level of a Tegra GPIO input pin associated with the root device with expected pin level.  More... | |
| NvMediaStatus | DevBlkCDIRootDevicePollGPIOPinLevel (DevBlkCDIDevice const *device, uint32_t gpio_idx, uint32_t expected_level, uint32_t poll_count, uint32_t poll_delay) | 
| Poll the logic level of a Tegra GPIO input pin associated with the root device with expected pin level.  More... | |
| 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.  More... | |
| NvMediaStatus | DevBlkCDIRootDeviceCheckIntrPin (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 level, and then clears any pending interrupt event.  More... | |
| #define | DEVBLK_CDI_GPIO_LEVEL_LOW (1U) | 
| CDI codes for CAMGPIO GPIO Levels.  More... | |
| #define | DEVBLK_CDI_GPIO_LEVEL_HIGH (2U) | 
| #define DEVBLK_CDI_GPIO_LEVEL_HIGH (2U) | 
Definition at line 255 of file devblk_cdi.h.
| #define DEVBLK_CDI_GPIO_LEVEL_LOW (1U) | 
CDI codes for CAMGPIO GPIO Levels.
Definition at line 254 of file devblk_cdi.h.
| #define DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS (16U) | 
The maximum number of GPIOs supported on a CDI Root Device.
Definition at line 168 of file devblk_cdi.h.
| #define MAX_POWER_LINKS_PER_BLOCK (4U) | 
The maximum number of power links per device block.
Definition at line 173 of file devblk_cdi.h.
| typedef void DevBlkCDIRootDevice | 
An opaque handle for an DevBlkCDIRootDevice object.
Definition at line 319 of file devblk_cdi.h.
| enum DevBlkCDI_I2CPort | 
Defines the I2C buses on the host hardware device.
Definition at line 144 of file devblk_cdi.h.
| enum DevBlkCDIGpioEvent | 
CDI codes for CAMGPIO Interrupt Events.
Definition at line 261 of file devblk_cdi.h.
| NvMediaStatus DevBlkCDIRootDeviceCheckGPIOPinLevel | ( | DevBlkCDIRootDevice const * | device, | 
| uint32_t | gpio_idx, | ||
| uint32_t | expected_level | ||
| ) | 
Compares the logic level of a Tegra GPIO input pin associated with the root device with expected pin level.
This API does the following:
| [in] | device | A pointer to the root device to use; Valid value: [non-NULL]. | 
| [in] | gpio_idx | The index of the GPIO pin; Valid range: [0, DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS - 1]. The range of gpio_idx will be checked in the supporting function. | 
| [in] | expected_level | The expected GPIO pin level of a Tegra GPIO input pin to compare with. Valid range: [ DEVBLK_CDI_GPIO_LEVEL_LOW, DEVBLK_CDI_GPIO_LEVEL_HIGH] | 
| NVMEDIA_STATUS_OK | Indicates that the call was successful. | 
| NVMEDIA_STATUS_BAD_PARAMETER | Indicates that parameter(s) were invalid. | 
| NVMEDIA_STATUS_ERROR | Indicate GPIO's current pin level did not match with the expected pin level or some other error occurred. | 
| NVMEDIA_STATUS_NOT_SUPPORTED | Indicates that the API is not supported on the current platform | 
 Usage considerations
| NvMediaStatus DevBlkCDIRootDeviceCheckIntrPin | ( | 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 level, and then clears any pending interrupt event.
This API does the following:
| [in] | device | A pointer to the root device to use; Valid value: [non-NULL]. | 
| [in] | gpio_idx | The index of the GPIO pin; Valid range: [0, DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS - 1]. The value of gpio_idx will be verified in the supporting function. | 
| NVMEDIA_STATUS_OK | Indicates that the call was successful. | 
| NVMEDIA_STATUS_NOT_SUPPORTED | Indicates that this API is not supported on the current platform. | 
| NVMEDIA_STATUS_BAD_PARAMETER | Indicates that parameter(s) were invalid. | 
| NVMEDIA_STATUS_ERROR | Indicates that some other error occurred. | 
 Usage considerations
| 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.
This API does the following:
| [in] | device | A pointer to the root device to use; Valid value: [non-NULL]. | 
| [in] | gpio_idx | The index of the GPIO pin; Valid range: [0, DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS - 1]. The range of gpio_idx will be checked in the supporting function. | 
| [out] | level | The GPIO pin level queried from CamGPIO; The pin level should be DEVBLK_CDI_GPIO_LEVEL_LOW or DEVBLK_CDI_GPIO_LEVEL_HIGH. | 
| NVMEDIA_STATUS_OK | Indicates that the call was successful. | 
| NVMEDIA_STATUS_BAD_PARAMETER | Indicates that parameter(s) were invalid. | 
| NVMEDIA_STATUS_ERROR | Indicate that some other error occurred. | 
| NVMEDIA_STATUS_NOT_SUPPORTED | Indicates that the API is not supported on the current platform | 
 Usage considerations
| NvMediaStatus DevBlkCDIRootDevicePollGPIOPinLevel | ( | DevBlkCDIDevice const * | device, | 
| uint32_t | gpio_idx, | ||
| uint32_t | expected_level, | ||
| uint32_t | poll_count, | ||
| uint32_t | poll_delay | ||
| ) | 
Poll the logic level of a Tegra GPIO input pin associated with the root device with expected pin level.
This API does the following:
| [in] | device | A pointer to the device to use; Valid value: [non-NULL]. | 
| [in] | gpio_idx | The index of the GPIO pin; Valid range: [0, DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS - 1]. The range of gpio_idx will be checked in the supporting function. | 
| [in] | expected_level | The expected GPIO pin level of a Tegra GPIO input pin to compare with. Valid range: [ DEVBLK_CDI_GPIO_LEVEL_LOW, DEVBLK_CDI_GPIO_LEVEL_HIGH] | 
| [in] | poll_count | Number of iteration [0, UINT32_MAX] | 
| [in] | poll_delay | Delay between two iteration in microseconds [0, UINT32_MAX] | 
| NVMEDIA_STATUS_OK | Indicates that the call was successful. | 
| NVMEDIA_STATUS_BAD_PARAMETER | Indicates that parameter(s) were invalid. | 
| NVMEDIA_STATUS_ERROR | Indicate GPIO's current pin level did not match with the expected pin level or some other error occurred. | 
| NVMEDIA_STATUS_NOT_SUPPORTED | Indicates that the API is not supported on the current platform | 
 Usage considerations
| 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.
This API does the following:
| [in] | device | A pointer to the root device to use; Valid value: [non-NULL]. | 
| [in] | gpio_idx | The index of the GPIO pin; Valid range: [0, DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS - 1]. The range of gpio_idx will be checked in the supporting function. | 
| [in] | level | The GPIO pin level to be set in CamGPIO; The pin level must be DEVBLK_CDI_GPIO_LEVEL_LOW or DEVBLK_CDI_GPIO_LEVEL_HIGH. The value of level will be checked in the supporting function. | 
| NVMEDIA_STATUS_OK | Indicates that the call was successful. | 
| NVMEDIA_STATUS_BAD_PARAMETER | Indicates that parameter(s) were invalid. | 
| NVMEDIA_STATUS_ERROR | Indicates that some other error occurred. | 
| NVMEDIA_STATUS_NOT_SUPPORTED | Indicates that this API is not supported on the current platform. | 
 Usage considerations