S2253_setgpiooutput, S2253_waitgpioinput – Sensoray 2253 Windows User Manual
Page 15

pointer to returned GPIO value (1 if GPIO high, 0 if GPIO low).
devid
device id in the system (use 0 with a single board installed).
S2253_SetGpioOutput
MID2253_API int __stdcall S2253_SetGpioOutput (
int
value,
int
devid);
Sets GPIO output on device. Please refer to hardware manual for connection
details.
value
value of GPIO output to set (1 if GPIO high, 0 if GPIO low).
devid
device id in the system (use 0 with a single board installed).
S2253_WaitGpioInput
MID2253_API int __stdcall S2253_WaitGpioInput (
MID2253_GPIO_SIGNAL
signal,
int
timeout,
int
devid);
Waits for GPIO input. The input detection is edge triggered. This function will
return right away if the input has already changed for the signal in question.
For example, if the input goes from low to high before calling this function,
S2253_WaitGpioInput will return right away for the signal MID2253_WAIT_HIGH.
If S2253_WaitGpioInput is called again with MID2253_WAIT_HIGH, it will block
until either the timeout or the input changes from low back to high to edge
trigger the event. The driver sets an internal event on the change of signal.
There is one event for the high transition and one event for the low transition.
Calling this function will clear the event in question. Using
MID2253_GPIO_CHANGE will wait for either event (or return right away if they
have already been triggered since the last S2253_WaitGpioInput call).
signal
MID2253_GPIO_LOW, MID2253_GPIO_HIGH, MID2253_GPIO_CHANGE(high or
low transition).
timeout
timeout in milliseconds. Use -1 for infinite.
devid
device id in the system (use 0 with a single board installed).
15