Test, please delete

Embed: (wiki syntax)

« Back to documentation index

ADISENSE Host GPIO interface functions

ADISENSE Host GPIO interface functions
[ADISENSE Host Portability Layer]

Typedefs

typedef void(* ADI_SENSE_GPIO_CALLBACK )(ADI_SENSE_GPIO_PIN ePinId, void *pArg)
typedef void * ADI_SENSE_GPIO_HANDLE

Enumerations

enum  ADI_SENSE_GPIO_PIN { ADI_SENSE_GPIO_PIN_RESET = 0, ADI_SENSE_GPIO_PIN_ERROR, ADI_SENSE_GPIO_PIN_ALERT, ADI_SENSE_GPIO_PIN_DATAREADY }

Functions

ADI_SENSE_RESULT adi_sense_GpioOpen (ADI_SENSE_PLATFORM_GPIO_CONFIG *pConfig, ADI_SENSE_GPIO_HANDLE *phDevice)
 Open the SPI interface and allocate resources.
void adi_sense_GpioClose (ADI_SENSE_GPIO_HANDLE hDevice)
 Close GPIO interface and free resources.
ADI_SENSE_RESULT adi_sense_GpioGet (ADI_SENSE_GPIO_HANDLE hDevice, ADI_SENSE_GPIO_PIN ePinId, bool_t *pbState)
 Get the state of the specified GPIO pin.
ADI_SENSE_RESULT adi_sense_GpioSet (ADI_SENSE_GPIO_HANDLE hDevice, ADI_SENSE_GPIO_PIN ePinId, bool_t bState)
 Set the state of the specified GPIO pin.
ADI_SENSE_RESULT adi_sense_GpioIrqEnable (ADI_SENSE_GPIO_HANDLE hDevice, ADI_SENSE_GPIO_PIN ePinId, ADI_SENSE_GPIO_CALLBACK callback, void *arg)
 Enable interrupt notifications on the specified GPIO pin.
ADI_SENSE_RESULT adi_sense_GpioIrqDisable (ADI_SENSE_GPIO_HANDLE hDevice, ADI_SENSE_GPIO_PIN ePinId)
 Disable interrupt notifications on the specified GPIO pin.

Typedef Documentation

typedef void(* ADI_SENSE_GPIO_CALLBACK)(ADI_SENSE_GPIO_PIN ePinId, void *pArg)

GPIO callback function signature

Parameters:
[in]ePinIdThe GPIO pin which triggered the interrupt notification
[in]pArgOptional opaque parameter to be passed to the callback

Definition at line 70 of file adi_sense_gpio.h.

typedef void* ADI_SENSE_GPIO_HANDLE

A handle used in all API functions to identify the GPIO interface context

Definition at line 75 of file adi_sense_gpio.h.


Enumeration Type Documentation

GPIO pin identifiers

Enumerator:
ADI_SENSE_GPIO_PIN_RESET 

RESET GPIO output signal

ADI_SENSE_GPIO_PIN_ERROR 

ERROR GPIO input signal

ADI_SENSE_GPIO_PIN_ALERT 

ALERT GPIO input signal

ADI_SENSE_GPIO_PIN_DATAREADY 

DATAREADY GPIO input signal

Definition at line 56 of file adi_sense_gpio.h.


Function Documentation

void adi_sense_GpioClose ( ADI_SENSE_GPIO_HANDLE  hDevice )

Close GPIO interface and free resources.

Parameters:
[in]hDeviceGPIO interface context handle (adi_sense_GpioOpen)

Definition at line 279 of file adi_sense_gpio.cpp.

ADI_SENSE_RESULT adi_sense_GpioGet ( ADI_SENSE_GPIO_HANDLE  hDevice,
ADI_SENSE_GPIO_PIN  ePinId,
bool_t *  pbState 
)

Get the state of the specified GPIO pin.

Parameters:
[in]hDeviceGPIO interface context handle (adi_sense_GpioOpen)
[in]ePinIdGPIO pin to be read
[out]pbStatePointer to return the state of the GPIO pin
Returns:
Status

Definition at line 227 of file adi_sense_gpio.cpp.

ADI_SENSE_RESULT adi_sense_GpioIrqDisable ( ADI_SENSE_GPIO_HANDLE  hDevice,
ADI_SENSE_GPIO_PIN  ePinId 
)

Disable interrupt notifications on the specified GPIO pin.

Parameters:
[in]hDeviceGPIO interface context handle (adi_sense_GpioOpen)
[in]ePinIdGPIO pin on which to disable interrupt notifications
Returns:
Status

Definition at line 267 of file adi_sense_gpio.cpp.

ADI_SENSE_RESULT adi_sense_GpioIrqEnable ( ADI_SENSE_GPIO_HANDLE  hDevice,
ADI_SENSE_GPIO_PIN  ePinId,
ADI_SENSE_GPIO_CALLBACK  callback,
void *  arg 
)

Enable interrupt notifications on the specified GPIO pin.

Parameters:
[in]hDeviceGPIO interface context handle (adi_sense_GpioOpen)
[in]ePinIdGPIO pin on which to enable interrupt notifications
[in]callbackCallback function to invoke when the GPIO is asserted
[in]argOptional opaque parameter to be passed to the callback
Returns:
Status

Definition at line 253 of file adi_sense_gpio.cpp.

ADI_SENSE_RESULT adi_sense_GpioOpen ( ADI_SENSE_PLATFORM_GPIO_CONFIG *  pConfig,
ADI_SENSE_GPIO_HANDLE phDevice 
)

Open the SPI interface and allocate resources.

Parameters:
[in]pConfigPointer to platform-specific GPIO interface details
[out]phDevicePointer to return a GPIO interface context handle
Returns:
Status

Definition at line 206 of file adi_sense_gpio.cpp.

ADI_SENSE_RESULT adi_sense_GpioSet ( ADI_SENSE_GPIO_HANDLE  hDevice,
ADI_SENSE_GPIO_PIN  ePinId,
bool_t  bState 
)

Set the state of the specified GPIO pin.

Parameters:
[in]hDeviceGPIO interface context handle (adi_sense_GpioOpen)
[in]ePinIdGPIO pin to be set
[in]bStateThe state to set for GPIO pin
Returns:
Status

Definition at line 240 of file adi_sense_gpio.cpp.