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 | DevBlkCDIGPIOIndices |
| Structure to hold array of CDAC GPIO indices. More... | |
| struct | DevBlkCDIPowerControlInfo |
| Structure to hold power control information. More... | |
Macros | |
| #define | DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS (8U) |
| The maximum number of GPIOs supported on a CDI Root Device. 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_SIMULATOR = 255 } |
| Defines the I2C buses on the host hardware device. More... | |
| enum | DevBlkCDIGpioEvent { DEVBLK_CDI_GPIO_EVENT_NOTHING = 0, DEVBLK_CDI_GPIO_EVENT_INTR, DEVBLK_CDI_GPIO_EVENT_ERROR_WAIT_CANCELLED, DEVBLK_CDI_GPIO_EVENT_ERROR_CDAC, DEVBLK_CDI_GPIO_EVENT_ERROR_BACKEND, DEVBLK_CDI_GPIO_EVENT_ERROR_UNKNOWN } |
| CDI codes for CDAC GPIO 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 | 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 | 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 level, and then clears any pending interrupt event. More... | |
| NvMediaStatus | DevBlkCDIRootDeviceGetGpioIntrEvent (DevBlkCDIRootDevice const *device, uint32_t gpio_idx, DevBlkCDIGpioEvent *event_code) |
Usage considerations More... | |
| #define | DEVBLK_CDI_GPIO_LEVEL_LOW (1U) |
| CDI codes for CDAC GPIO Levels. More... | |
| #define | DEVBLK_CDI_GPIO_LEVEL_HIGH (2U) |
| #define DEVBLK_CDI_GPIO_LEVEL_HIGH (2U) |
Definition at line 193 of file devblk_cdi.h.
| #define DEVBLK_CDI_GPIO_LEVEL_LOW (1U) |
CDI codes for CDAC GPIO Levels.
Definition at line 192 of file devblk_cdi.h.
| #define DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS (8U) |
The maximum number of GPIOs supported on a CDI Root Device.
Definition at line 157 of file devblk_cdi.h.
| typedef void DevBlkCDIRootDevice |
An opaque handle for an DevBlkCDIRootDevice object.
Definition at line 229 of file devblk_cdi.h.
| enum DevBlkCDI_I2CPort |
Defines the I2C buses on the host hardware device.
Definition at line 138 of file devblk_cdi.h.
| enum DevBlkCDIGpioEvent |
CDI codes for CDAC GPIO Interrupt Events.
Definition at line 199 of file devblk_cdi.h.
| 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 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 DevBlkCDIRootDeviceGetGpioIntrEvent | ( | DevBlkCDIRootDevice const * | device, |
| uint32_t | gpio_idx, | ||
| DevBlkCDIGpioEvent * | event_code | ||
| ) |
Usage considerations
Queries CDAC for the latest event code of a GPIO pin.
This API does the following:
| [in] | device | A pointer to the root device to use; Valid value: [non-NULL]. |
| [in] | gpio_idx | The CDAC GPIO index; Valid range: [0, DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS - 1]. |
| [out] | event_code | A pointer to the returned CDAC GPIO interrupt event code; Valid value: [non-NULL]. |
| NVMEDIA_STATUS_OK | Indicates that the operation was successful. |
| NVMEDIA_STATUS_BAD_PARAMETER | Indicates that device was NULL. |
| NVMEDIA_STATUS_NOT_SUPPORTED | Indicates that this API is not supported on the current platform. |
| 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 CDAC; 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 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 CDAC; 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