Modules | |
| GPIO HAL tests | |
| The GPIO HAL tests ensure driver conformance to defined behaviour. | |
Functions | |
| uint32_t | gpio_set (PinName pin) |
| Set the given pin as GPIO. More... | |
| int | gpio_is_connected (const gpio_t *obj) |
| Checks if gpio object is connected (pin was not initialized with NC) More... | |
| void | gpio_init (gpio_t *obj, PinName pin) |
| Initialize the GPIO pin. More... | |
| void | gpio_free (gpio_t *obj) |
| Releases the GPIO pin. More... | |
| void | gpio_mode (gpio_t *obj, PinMode mode) |
| Set the input pin mode. More... | |
| void | gpio_dir (gpio_t *obj, PinDirection direction) |
| Set the pin direction. More... | |
| void | gpio_write (gpio_t *obj, int value) |
| Set the output value. More... | |
| int | gpio_read (gpio_t *obj) |
| Read the input value. More... | |
| void | gpio_init_in (gpio_t *gpio, PinName pin) |
| Init the input pin and set mode to PullDefault. More... | |
| void | gpio_init_in_ex (gpio_t *gpio, PinName pin, PinMode mode) |
| Init the input pin and set the mode. More... | |
| void | gpio_init_out (gpio_t *gpio, PinName pin) |
| Init the output pin as an output, with predefined output value 0. More... | |
| void | gpio_init_out_ex (gpio_t *gpio, PinName pin, int value) |
| Init the pin as an output and set the output value. More... | |
| void | gpio_init_inout (gpio_t *gpio, PinName pin, PinDirection direction, PinMode mode, int value) |
| Init the pin to be in/out. More... | |
| const PinMap * | gpio_pinmap (void) |
| Get the pins that support all GPIO tests. More... | |
| void gpio_dir | ( | gpio_t * | obj, |
| PinDirection | direction | ||
| ) |
Set the pin direction.
| obj | The GPIO object (must be connected) |
| direction | The pin direction to be set |
| void gpio_free | ( | gpio_t * | obj | ) |
Releases the GPIO pin.
| obj | The GPIO object to release |
| void gpio_init | ( | gpio_t * | obj, |
| PinName | pin | ||
| ) |
Initialize the GPIO pin.
| obj | The GPIO object to initialize |
| pin | The GPIO pin to initialize (may be NC) |
| void gpio_init_in | ( | gpio_t * | gpio, |
| PinName | pin | ||
| ) |
Init the input pin and set mode to PullDefault.
| gpio | The GPIO object |
| pin | The pin name (may be NC) |
| void gpio_init_in_ex | ( | gpio_t * | gpio, |
| PinName | pin, | ||
| PinMode | mode | ||
| ) |
Init the input pin and set the mode.
| gpio | The GPIO object |
| pin | The pin name (may be NC) |
| mode | The pin mode to be set |
| void gpio_init_inout | ( | gpio_t * | gpio, |
| PinName | pin, | ||
| PinDirection | direction, | ||
| PinMode | mode, | ||
| int | value | ||
| ) |
Init the pin to be in/out.
| gpio | The GPIO object |
| pin | The pin name (may be NC) |
| direction | The pin direction to be set |
| mode | The pin mode to be set |
| value | The value to be set for an output pin |
| void gpio_init_out | ( | gpio_t * | gpio, |
| PinName | pin | ||
| ) |
Init the output pin as an output, with predefined output value 0.
| gpio | The GPIO object |
| pin | The pin name (may be NC) |
| void gpio_init_out_ex | ( | gpio_t * | gpio, |
| PinName | pin, | ||
| int | value | ||
| ) |
Init the pin as an output and set the output value.
| gpio | The GPIO object |
| pin | The pin name (may be NC) |
| value | The value to be set |
| int gpio_is_connected | ( | const gpio_t * | obj | ) |
Checks if gpio object is connected (pin was not initialized with NC)
| obj | The GPIO object |
| void gpio_mode | ( | gpio_t * | obj, |
| PinMode | mode | ||
| ) |
Set the input pin mode.
| obj | The GPIO object (must be connected) |
| mode | The pin mode to be set |
| const PinMap* gpio_pinmap | ( | void | ) |
| int gpio_read | ( | gpio_t * | obj | ) |
Read the input value.
| obj | The GPIO object (must be connected) |
| uint32_t gpio_set | ( | PinName | pin | ) |
Set the given pin as GPIO.
| pin | The pin to be set as GPIO |
| void gpio_write | ( | gpio_t * | obj, |
| int | value | ||
| ) |
Set the output value.
| obj | The GPIO object (must be connected) |
| value | The value to be set |