GPIO API¶
GPIO interface.
- Author
- kubos.co
Enums
Functions
-
void
k_gpio_init
(int pin, KGPIOMode mode, KGPIOPullup pullup)¶ Initializes GPIO pin.
- Parameters
pin
: pin to initializemode
: mode setting for pinpullup
: pullup setting for pin
-
unsigned int
k_gpio_read
(int pin)¶ Reads value from GPIO pin.
- Return
- int value which was read
- Parameters
pin
: gpio pin to read from
-
void
k_gpio_write
(int pin, unsigned int val)¶ Writes value to GPIO pin.
- Parameters
pin
: gpio pin to write toval
: value to write to pin
-
void
k_gpio_toggle
(int pin)¶ Inverts current value of gpio pin.
- Parameters
pin
: gpio pin to invert