General Purpose I/O control.
Definition gpio.h:22
void DeInit()
Deinitializes the GPIO pin.
void Init(Pin p, const Config &cfg)
Initialize the GPIO with a Configuration struct, and explicit pin.
void Write(bool state)
Changes the state of the GPIO hardware when configured as an OUTPUT.
void Init(const Config &cfg)
Initialize the GPIO from a Config struct.
GPIO()
Definition gpio.h:74
bool Read()
Reads the state of the GPIO.
Pull
Configures whether an internal Pull up or Pull down resistor is used.
Definition gpio.h:42
Speed
Output speed controls the drive strength, and slew rate of the pin.
Definition gpio.h:50
void Init(Pin p, Mode m=Mode::INPUT, Pull pu=Pull::NOPULL, Speed sp=Speed::LOW)
Explicity initialize all configuration for the GPIO.
Config & GetConfig()
Definition gpio.h:121
void Init()
Initialize the GPIO using the internal Config struct.
void Toggle()
flips the current state of the GPIO. If it was HIGH, it will go LOW, and vice versa.
Mode
Mode of operation for the specified GPIO.
Definition gpio.h:26
Definition leddriver.h:33
Hardware defines and helpers for daisy field platform.
Definition index.h:2
Configuration for a given GPIO.
Definition gpio.h:59
Pull pull
Definition gpio.h:62
Speed speed
Definition gpio.h:63
Mode mode
Definition gpio.h:61
Config()
Definition gpio.h:68
Pin pin
Definition gpio.h:60
representation of hardware port/pin combination
Definition daisy_core.h:193