20#ifndef MBED_GPIO_API_H
21#define MBED_GPIO_API_H
73 uint8_t pull_none : 1;
74 uint8_t pull_down : 1;
174void gpio_init_inout(gpio_t *gpio, PinName pin, PinDirection direction, PinMode mode,
int value);
void gpio_free(gpio_t *obj)
Releases the GPIO pin.
void gpio_dir(gpio_t *obj, PinDirection direction)
Set the pin direction.
void gpio_init_out(gpio_t *gpio, PinName pin)
Init the output pin as an output, with predefined output value 0.
void gpio_init_in(gpio_t *gpio, PinName pin)
Init the input pin and set mode to PullDefault.
int gpio_is_connected(const gpio_t *obj)
Checks if gpio object is connected (pin was not initialized with NC)
void gpio_init(gpio_t *obj, PinName pin)
Initialize the GPIO pin.
void gpio_mode(gpio_t *obj, PinMode mode)
Set the input pin mode.
int gpio_read(gpio_t *obj)
Read the input value.
const PinMap * gpio_pinmap(void)
Get the pins that support all GPIO tests.
void gpio_init_in_ex(gpio_t *gpio, PinName pin, PinMode mode)
Init the input pin and set the mode.
void gpio_init_inout(gpio_t *gpio, PinName pin, PinDirection direction, PinMode mode, int value)
Init the pin to be in/out.
uint32_t gpio_set(PinName pin)
Set the given pin as GPIO.
void gpio_write(gpio_t *obj, int value)
Set the output value.
void gpio_init_out_ex(gpio_t *gpio, PinName pin, int value)
Init the pin as an output and set the output value.
void gpio_get_capabilities(gpio_t *gpio, gpio_capabilities_t *cap)
Fill the given gpio_capabilities_t instance according to pin capabilities.
GPIO capabilities for a given pin.