Public members of gpio_conf_t
More...
Public members of gpio_conf_t
The type gpio_conf_t
is implementation specific, but will in any case be a union of an unsigned integer of implementation defined width named bits
(to access all bits of the configuration in one read/write), and an anonymous struct
to access the actual configuration via its members.
The members given here have to be present in every implementation. Make sure to use the enum
names to assign them, as the actual numeric representation again is implementation specific.
It is explicitly intended that code makes use of implementation specific extensions to gpio_conf_t
. However, portable code should be restricted to only use the members detailed here and make sure that all other bits are initialized with zero.
#include <gpio_ll.h>
Data Fields | ||
uint8_t | bits | |
The raw bits of the configuration. | ||
struct { | ||
gpio_state_t state: 3 | ||
State of the pin. More... | ||
gpio_pull_t pull: 2 | ||
Pull resistor configuration. More... | ||
bool initial_value: 1 | ||
Initial value of the output. More... | ||
uint8_t : 2 | ||
}; | ||
uint8_t gpio_conf_minimal::bits |
bool gpio_conf_minimal::initial_value |
Initial value of the output.
Ignored if gpio_conf_minimal::state is set to GPIO_INPUT or GPIO_DISCONNECT. If the pin was previously in a high impedance state, it is guaranteed to directly transition to the given initial value.
gpio_ll_query_conf will write the current value of the specified pin here, which is read from the input register when the state is GPIO_INPUT, otherwise the state from the output register is consulted.
gpio_pull_t gpio_conf_minimal::pull |
gpio_state_t gpio_conf_minimal::state |