[−][src]Module msp430fr2x5x_hal::batch_gpio
GPIO batch configuration.
The Batch
abstraction allows "collecting" changes to the configurations of different pins on
a GPIO port and writing the changes to the hardware all at once.
Changes to individual pins are performed statically using typestates, so the number of
register writes are minimized.
For example, P2.batch().config_pin3(|p| p.to_input_pullup()).config_pin1(|p| p.to_output()).split(&pmm)
configures P2.3 as a pullup input pin and P2.1 as an output pin and then writes the
configuration to the hardware in a single set of writes.
Structs
Batch | Collection of proxies for pins 0 to 7 of a specific port, used to commit configurations for all pins in a single step. |
PinProxy | Proxy for a GPIO pin used for batch writes. |