beautypg.com

S2253p_gpioconfig, S2253p_gpiowrite, S2253p_gpioread – Sensoray 2253 Windows User Manual

Page 42

background image

S2253P_MODE_UPDATE: send encoder update transaction
S2253P_MODE_READ: read encoder reply
S2253P_MODE_UPDATE_READ: both

value

pointer to variable receiving current value, for read transactions

S2253P_GpioConfig

MID2253_API int __stdcall S2253P_GpioConfig (

int

devid,

int

gpioId,

S2253P_GPIO_DIRECTION

direction);

This function configures a gpio with a direction.
devid

device id in the system (use 0 with a single board installed).

gpioId

gpio identifier 0 or 1.

direction

S2253P_GPIO_DIR_IN
S2253P_GPIO_DIR_OUT

S2253P_GpioWrite

MID2253_API int __stdcall S2253P_GpioWrite (

int

devid,

int

gpioId,

int

value);

This function sets a gpio output level. It must be configured as an output.
devid

device id in the system (use 0 with a single board installed).

gpioId

gpio identifier 0 or 1.

value

0 or 1 (active low)

S2253P_GpioRead

MID2253_API int __stdcall S2253P_GpioRead (

int

devid,

42

This manual is related to the following products: