Product Comparison: USB I2C | USB SPI | USB GPIO

USB-I/O Interface Adapter GPIO-24. Programmer's Reference Manual.


2.2.2. GPIO_GetEvent()

GPIO_RESULT GPIO_GetEvent(
      HGPIO hDevice,
      GPIO_EVENT* pEvent
);

The GPIO_GetEvent() function checks an event queue for an event or response sent by specified GPIO-24 adapter.

During DLL initialization you can choose how the library should notify your application when GPIO-24 adapter sends events or responses.

Parameters:

hDevice

Handle to the GPIO-24 adapter. If the device handle is specified, an event queue will be checked for an event from the particular device. Use HGPIO_DLL_NOTIFICATION constant to obtain events sent by DLL. Use HGPIO_ALL_DEVICES constant to get the eldest event, sent either by any open device or by DLL.

pEvent

Pointer to GPIO_EVENT structure to be filled with event details.

Return values:

GPIO_S_SUCCESS

Function call succeeded.

GPIO_E_EVENT_ABSENT

There are no new events.

GPIO_E_HANDLE

Invalid device handle has been provided.

GPIO_E_FAIL

Failed to read event.

GPIO_E_NOT_INITIALIZED

Library has not been initialized.