Вы здесь

U2C_SetSingleIoDirection()

U2C_RESULT U2C_SetSingleIoDirection(
      HANDLE hDevice,
      ULONG IoNumber,
      BOOL bOutput
);

The U2C_SetSingleIoDirection() function configures input/output direction of the specified GPIO pin.

Parameters:

hDevice

Handle to the U2C-12 device.

IoNumber

The number of the GPIO pin to change direction:

  • Numbers 0..7 correspond to Port A pins 0..7
  • Numbers 8..15 correspond to Port B pins 0..7
  • Number 16..23 correspond to Port C pins 0..7

bOutput

The direction of the GPIO pin:

  • bOutput = TRUE configures the GPIO pin for output
  • bOutput = FALSE configures the GPIO pin for input

Return values:

U2C_SUCCESS

The GPIO pin direction was successfully modified.

U2C_HARDWARE_NOT_FOUND

U2C-12 device referenced by hDevice handle was not found.

U2C_BAD_PARAMETER

IoNumber is out of range.

Rating: 
Голосов пока нет

Языки

Вход на сайт