Contiki-NG
|
Files | |
file | gpio-hal-arch.c |
Implementation file for the CC13xx/CC26xx GPIO HAL functions. | |
file | gpio-hal-arch.h |
Header file for the CC13xx/CC26xx GPIO HAL functions. | |
Functions | |
void | gpio_hal_arch_no_port_pin_cfg_set (gpio_hal_pin_t pin, gpio_hal_pin_cfg_t cfg) |
Configure a gpio pin. More... | |
gpio_hal_pin_cfg_t | gpio_hal_arch_no_port_pin_cfg_get (gpio_hal_pin_t pin) |
Read the configuration of a GPIO pin. More... | |
gpio_hal_pin_mask_t | gpio_hal_arch_no_port_read_pins (gpio_hal_pin_mask_t pins) |
Read multiple pins. More... | |
uint8_t | gpio_hal_arch_no_port_read_pin (gpio_hal_pin_t pin) |
Read a GPIO pin. More... | |
gpio_hal_pin_cfg_t gpio_hal_arch_no_port_pin_cfg_get | ( | gpio_hal_pin_t | pin | ) |
Read the configuration of a GPIO pin.
pin | The GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1) |
It is the platform developer's responsibility to provide an implementation.
The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.
Definition at line 89 of file gpio-hal-arch.c.
References config().
void gpio_hal_arch_no_port_pin_cfg_set | ( | gpio_hal_pin_t | pin, |
gpio_hal_pin_cfg_t | cfg | ||
) |
Configure a gpio pin.
pin | The GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1) |
cfg | The configuration |
cfg is an OR mask of GPIO_HAL_PIN_CFG_xyz
The implementation of this function also has to make sure that pin is configured as software-controlled GPIO.
It is the platform developer's responsibility to provide an implementation.
The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.
Definition at line 49 of file gpio-hal-arch.c.
References config().
uint8_t gpio_hal_arch_no_port_read_pin | ( | gpio_hal_pin_t | pin | ) |
Read a GPIO pin.
pin | The GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1) |
0 | The pin is logical low |
1 | The pin is logical high |
It is the platform developer's responsibility to provide an implementation.
The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.
Definition at line 146 of file gpio-hal-arch.c.
gpio_hal_pin_mask_t gpio_hal_arch_no_port_read_pins | ( | gpio_hal_pin_mask_t | pins | ) |
Read multiple pins.
pins | An ORd pin mask of the pins to read |
An | ORd mask of the pins that are high |
If the position of the pin in pins is set and the pin is logical high then the position of the pin in the return value will be set. For example, if you pass 0x09 as the value of pins and the return value is 0x08 then pin 3 is logical high and pin 0 is logical low.
It is the platform developer's responsibility to provide an implementation.
The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.
Definition at line 132 of file gpio-hal-arch.c.