SDK4.0
This document shows Ameba SDK 4.0 APIs
|
gpio functions More...
Ameba Common | |
void | gpio_init (gpio_t *obj, PinName pin) |
Initializes the GPIO device, include mode/direction/pull control registers. More... | |
uint32_t | gpio_set (PinName pin) |
Set the given pin as GPIO. More... | |
void | gpio_mode (gpio_t *obj, PinMode mode) |
Set GPIO mode. More... | |
void | gpio_dir (gpio_t *obj, PinDirection direction) |
Set GPIO direction. More... | |
void | gpio_write (gpio_t *obj, int value) |
Sets value to the selected output port pin. More... | |
int | gpio_read (gpio_t *obj) |
Reads the specified gpio port pin. More... | |
gpio functions
void gpio_dir | ( | gpio_t * | obj, |
PinDirection | direction | ||
) |
Set GPIO direction.
obj | gpio object define in application software. |
direction | this parameter can be one of the following values:
|
none |
void gpio_init | ( | gpio_t * | obj, |
PinName | pin | ||
) |
Initializes the GPIO device, include mode/direction/pull control registers.
obj | gpio object define in application software. |
pin | PinName according to pinmux spec. |
none |
void gpio_mode | ( | gpio_t * | obj, |
PinMode | mode | ||
) |
Set GPIO mode.
obj | gpio object define in application software. |
mode | this parameter can be one of the following values:
|
none |
int gpio_read | ( | gpio_t * | obj | ) |
Reads the specified gpio port pin.
obj | gpio object define in application software. |
1 | pin state is high |
0 | pin state is low |
uint32_t gpio_set | ( | PinName | pin | ) |
Set the given pin as GPIO.
pin | PinName according to pinmux spec. |
The given pin with GPIO function |
void gpio_write | ( | gpio_t * | obj, |
int | value | ||
) |
Sets value to the selected output port pin.
obj | gpio object define in application software. |
value | specifies the value to be written to the selected pin This parameter can be one of the following values:
|
none |