(Working) Code to interface 3 LoadCells to ADISense1000 and display values using the Labview code.
Fork of 4Bridge_ADISense1000_Example_copy by
ADI Sense Host GPIO interface functions
[ADI Sense 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 *bState) |
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] ePinId The GPIO pin which triggered the interrupt notification [in] pArg Optional 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
enum ADI_SENSE_GPIO_PIN |
GPIO pin identifiers
- Enumerator:
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] hDevice GPIO 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 * | bState | ||
) |
Get the state of the specified GPIO pin.
- Parameters:
-
[in] hDevice GPIO interface context handle (adi_sense_GpioOpen) [in] ePinId GPIO pin to be read [out] pbState Pointer to return the state of the GPIO pin
- Returns:
- Status
- ADI_SENSE_SUCCESS Call completed successfully
- ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified
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] hDevice GPIO interface context handle (adi_sense_GpioOpen) [in] ePinId GPIO pin on which to disable interrupt notifications
- Returns:
- Status
- ADI_SENSE_SUCCESS Call completed successfully
- ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified
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] hDevice GPIO interface context handle (adi_sense_GpioOpen) [in] ePinId GPIO pin on which to enable interrupt notifications [in] callback Callback function to invoke when the GPIO is asserted [in] arg Optional opaque parameter to be passed to the callback
- Returns:
- Status
- ADI_SENSE_SUCCESS Call completed successfully
- ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified
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] pConfig Pointer to platform-specific GPIO interface details [out] phDevice Pointer to return a GPIO interface context handle
- Returns:
- Status
- ADI_SENSE_SUCCESS Call completed successfully
- ADI_SENSE_NO_MEM Failed to allocate memory for interface context
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] hDevice GPIO interface context handle (adi_sense_GpioOpen) [in] ePinId GPIO pin to be set [in] bState The state to set for GPIO pin
- Returns:
- Status
- ADI_SENSE_SUCCESS Call completed successfully
- ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified
Definition at line 240 of file adi_sense_gpio.cpp.
Generated on Tue Jul 12 2022 21:13:17 by 1.7.2