mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Functions | |
uint32_t | gpio_set (PinName pin) |
Set the given pin as GPIO. | |
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. | |
void | gpio_dir (gpio_t *obj, PinDirection direction) |
Set the pin direction. | |
void | gpio_write (gpio_t *obj, int value) |
Set the output value. | |
int | gpio_read (gpio_t *obj) |
Read the input value. | |
void | gpio_init_in (gpio_t *gpio, PinName pin) |
Init the input pin and set mode to PullDefault. | |
void | gpio_init_in_ex (gpio_t *gpio, PinName pin, PinMode mode) |
Init the input pin and set the mode. | |
void | gpio_init_out (gpio_t *gpio, PinName pin) |
Init the output pin as an output, with predefined output value 0. | |
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_init_inout (gpio_t *gpio, PinName pin, PinDirection direction, PinMode mode, int value) |
Init the pin to be in/out. |
Function Documentation
void gpio_dir | ( | gpio_t * | obj, |
PinDirection | direction | ||
) |
Set the pin direction.
- Parameters:
-
obj The GPIO object direction The pin direction to be set
void gpio_init | ( | gpio_t * | obj, |
PinName | pin | ||
) |
Initialize the GPIO pin.
- Parameters:
-
obj The GPIO object to initialize pin The GPIO pin to initialize
void gpio_init_in | ( | gpio_t * | gpio, |
PinName | pin | ||
) |
Init the input pin and set mode to PullDefault.
- Parameters:
-
obj The GPIO object pin The pin name
Definition at line 37 of file mbed_gpio.c.
void gpio_init_in_ex | ( | gpio_t * | gpio, |
PinName | pin, | ||
PinMode | mode | ||
) |
Init the input pin and set the mode.
- Parameters:
-
obj The GPIO object pin The pin name mode The pin mode to be set
Definition at line 41 of file mbed_gpio.c.
void gpio_init_inout | ( | gpio_t * | gpio, |
PinName | pin, | ||
PinDirection | direction, | ||
PinMode | mode, | ||
int | value | ||
) |
Init the pin to be in/out.
- Parameters:
-
obj The GPIO object pin The pin name direction The pin direction to be set mode The pin mode to be set value The value to be set for an output pin
Definition at line 53 of file mbed_gpio.c.
void gpio_init_out | ( | gpio_t * | gpio, |
PinName | pin | ||
) |
Init the output pin as an output, with predefined output value 0.
- Parameters:
-
obj The GPIO object pin The pin name
- Returns:
- An integer value 1 or 0
Definition at line 45 of file mbed_gpio.c.
void gpio_init_out_ex | ( | gpio_t * | gpio, |
PinName | pin, | ||
int | value | ||
) |
Init the pin as an output and set the output value.
- Parameters:
-
obj The GPIO object pin The pin name value The value to be set
Definition at line 49 of file mbed_gpio.c.
void gpio_mode | ( | gpio_t * | obj, |
PinMode | mode | ||
) |
Set the input pin mode.
- Parameters:
-
obj The GPIO object mode The pin mode to be set
int gpio_read | ( | gpio_t * | obj ) |
Read the input value.
- Parameters:
-
obj The GPIO object
- Returns:
- An integer value 1 or 0
uint32_t gpio_set | ( | PinName | pin ) |
Set the given pin as GPIO.
- Parameters:
-
pin The pin to be set as GPIO
- Returns:
- The GPIO port mask for this pin
void gpio_write | ( | gpio_t * | obj, |
int | value | ||
) |
Set the output value.
- Parameters:
-
obj The GPIO object value The value to be set
Generated on Wed Jul 13 2022 02:23:49 by 1.7.2