Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.4 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

    Detailed Description

    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)
     

    Macro Definition Documentation

    ◆ DEVBLK_CDI_GPIO_LEVEL_HIGH

    #define DEVBLK_CDI_GPIO_LEVEL_HIGH   (2U)

    Definition at line 193 of file devblk_cdi.h.

    ◆ DEVBLK_CDI_GPIO_LEVEL_LOW

    #define DEVBLK_CDI_GPIO_LEVEL_LOW   (1U)

    CDI codes for CDAC GPIO Levels.

    Definition at line 192 of file devblk_cdi.h.

    ◆ DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS

    #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 Documentation

    ◆ DevBlkCDIRootDevice

    typedef void DevBlkCDIRootDevice

    An opaque handle for an DevBlkCDIRootDevice object.

    Definition at line 229 of file devblk_cdi.h.

    Enumeration Type Documentation

    ◆ DevBlkCDI_I2CPort

    Defines the I2C buses on the host hardware device.

    Enumerator
    DEVBLK_CDI_I2C_BUS_0 

    Specifies i2c-0.

    DEVBLK_CDI_I2C_BUS_1 

    Specifies i2c-1.

    DEVBLK_CDI_I2C_BUS_2 

    Specifies i2c-2.

    DEVBLK_CDI_I2C_BUS_3 

    Specifies i2c-3.

    DEVBLK_CDI_I2C_BUS_4 

    Specifies i2c-4.

    DEVBLK_CDI_I2C_BUS_5 

    Specifies i2c-5.

    DEVBLK_CDI_I2C_BUS_6 

    Specifies i2c-6.

    DEVBLK_CDI_I2C_BUS_7 

    Specifies i2c-7.

    DEVBLK_CDI_I2C_BUS_8 

    Specifies i2c-8.

    DEVBLK_CDI_I2C_BUS_9 

    Specifies i2c-9.

    DEVBLK_CDI_I2C_BUS_10 

    Specifies i2c-10.

    DEVBLK_CDI_I2C_BUS_11 

    Specifies i2c-11.

    DEVBLK_CDI_I2C_SIMULATOR 

    Port SIMULATOR (20)

    Definition at line 138 of file devblk_cdi.h.

    ◆ DevBlkCDIGpioEvent

    CDI codes for CDAC GPIO Interrupt Events.

    Enumerator
    DEVBLK_CDI_GPIO_EVENT_NOTHING 

    There is no pending event.

    DEVBLK_CDI_GPIO_EVENT_INTR 

    An interrupt has occurred.

    DEVBLK_CDI_GPIO_EVENT_ERROR_WAIT_CANCELLED 

    Waiting for an interrupt was unexpectedly cancelled, potentially resulting in permanent loss of functionality.

    (Error)

    DEVBLK_CDI_GPIO_EVENT_ERROR_CDAC 

    An error occurred in CDAC code, potentially resulting in permanent loss of functionality.

    (Error)

    DEVBLK_CDI_GPIO_EVENT_ERROR_BACKEND 

    An error occurred in backend code, potentially resulting in permanent loss of functionality.

    (Error)

    DEVBLK_CDI_GPIO_EVENT_ERROR_UNKNOWN 

    A generic error occurred, potentially resulting in permanent loss of functionality.

    (Error)

    Definition at line 199 of file devblk_cdi.h.

    Function Documentation

    ◆ DevBlkCDIRootDeviceCheckAndClearIntr()

    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:

    1. Verifies the input parameters.
    2. Calls platform-specific cdiRootDevCheckAndClearIntr() supporting function to check and clear interrupts.
    Parameters
    [in]deviceA pointer to the root device to use; Valid value: [non-NULL].
    [in]gpio_idxThe 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.
    Return values
    NVMEDIA_STATUS_OKIndicates that the call was successful.
    NVMEDIA_STATUS_NOT_SUPPORTEDIndicates that this API is not supported on the current platform.
    NVMEDIA_STATUS_BAD_PARAMETERIndicates that parameter(s) were invalid.
    NVMEDIA_STATUS_ERRORIndicates that some other error occurred.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: Yes
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    ◆ DevBlkCDIRootDeviceGetGpioIntrEvent()

    NvMediaStatus DevBlkCDIRootDeviceGetGpioIntrEvent ( DevBlkCDIRootDevice const *  device,
    uint32_t  gpio_idx,
    DevBlkCDIGpioEvent event_code 
    )


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: Yes
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    Queries CDAC for the latest event code of a GPIO pin.

    This API does the following:

    1. Verifies the input parameters. Makes sure a memory is allocated to hold the returned GPIO interrupt event code.
    2. Calls platform-specific cdiRootDevGetGpioIntrEvent() supporting function to retrieve the GPIO interrupt event code.
    Parameters
    [in]deviceA pointer to the root device to use; Valid value: [non-NULL].
    [in]gpio_idxThe CDAC GPIO index; Valid range: [0, DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS - 1].
    [out]event_codeA pointer to the returned CDAC GPIO interrupt event code; Valid value: [non-NULL].
    Return values
    NVMEDIA_STATUS_OKIndicates that the operation was successful.
    NVMEDIA_STATUS_BAD_PARAMETERIndicates that device was NULL.
    NVMEDIA_STATUS_NOT_SUPPORTEDIndicates that this API is not supported on the current platform.
    NVMEDIA_STATUS_ERRORIndicates that some other error occurred.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: Yes
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    ◆ DevBlkCDIRootDeviceGetGPIOPinLevel()

    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:

    1. Verifies the input parameters. Makes sure a memory is allocated to hold the return GPIO pin level.
    2. Calls platform-specific cdiRootDevGetGPIOPinLevel() supporting function to retrieve GPIO pin level.
    Parameters
    [in]deviceA pointer to the root device to use; Valid value: [non-NULL].
    [in]gpio_idxThe 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]levelThe GPIO pin level queried from CDAC; The pin level should be DEVBLK_CDI_GPIO_LEVEL_LOW or DEVBLK_CDI_GPIO_LEVEL_HIGH.
    Return values
    NVMEDIA_STATUS_OKIndicates that the call was successful.
    NVMEDIA_STATUS_BAD_PARAMETERIndicates that parameter(s) were invalid.
    NVMEDIA_STATUS_ERRORIndicate that some other error occurred.
    NVMEDIA_STATUS_NOT_SUPPORTEDIndicates that the API is not supported on the current platform


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    ◆ DevBlkCDIRootDeviceSetGPIOPinLevel()

    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:

    1. Verifies the input parameters.
    2. Calls platform-specific cdiRootDevSetGPIOPinLevel() supporting function to set GPIO pin level.
    Parameters
    [in]deviceA pointer to the root device to use; Valid value: [non-NULL].
    [in]gpio_idxThe 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]levelThe 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.
    Return values
    NVMEDIA_STATUS_OKIndicates that the call was successful.
    NVMEDIA_STATUS_BAD_PARAMETERIndicates that parameter(s) were invalid.
    NVMEDIA_STATUS_ERRORIndicates that some other error occurred.
    NVMEDIA_STATUS_NOT_SUPPORTEDIndicates that this API is not supported on the current platform.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No
    人人超碰97caoporen国产