IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page


◆ gpioSetMode()

int gpioSetMode ( int  pioNumber,
GPIO_MODES  mode 
)

Set GPIO mode (input/output/opendrain). You must enable a GPIO before setting it's mode by calling gpioEnable().

Parameters
pioNumberPIO number
mode1 = input
2 = input with pullup
3 = input with pulldown
4 = output high
5 = output low
6 = output high (opendrain)
7 = output low (opendrain)
Note
Not all of the modes are available for each GPIO and on each IPC@CHIP® target processor.
Returns
0 - success
-1 - wrong mode
-2 - wrong PIO number
Since
V0.80
See also
gpioEnable() GPIO_MODES





Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Fri Feb 9 2018 17:44:49 by Doxygen 1.8.13