[−][src]Module msp430fr2x5x_hal::gpio
GPIO abstractions for configuring and controlling individual GPIO pins.
To specify any pin, use the bounds Pin<PORT: PortNum, PIN: PinNum>
.
To specify any pin on a port that supports interrupts, use the bounds Pin<PORT: IntrPortNum, PIN: PinNum>
.
To specify any pin on PortX, use the bounds Pin<PortX, PIN: PinNum>
.
Note that interrupts are only supported by the hardware on ports 1 to 4, so interrupt-related methods are only available on those pins.
Pins can be converted to alternate functionalities 1 to 3, but the availability of these
conversions on each pin is limited by the hardware capabilities in the datasheet
, so not
every pin in every configuration can be converted to every alternate functionality.
Re-exports
pub use crate::batch_gpio::*; |
Structs
Alternate1 | Typestate for GPIO alternate function 1 |
Alternate2 | Typestate for GPIO alternate function 2 |
Alternate3 | Typestate for GPIO alternate function 3 |
Floating | Pull typestate for floating inputs |
Input | Direction typestate for GPIO input. The type parameter specifies pull direction of input. |
Output | Direction typestate for GPIO output |
Parts | GPIO parts for a specific port, including all 8 pins. |
Pin | A single GPIO pin. |
Pin0 | Pin number 0 |
Pin1 | Pin number 1 |
Pin2 | Pin number 2 |
Pin3 | Pin number 3 |
Pin4 | Pin number 4 |
Pin5 | Pin number 5 |
Pin6 | Pin number 6 |
Pin7 | Pin number 7 |
Port1 | Port P1 |
Port2 | Port P2 |
Port3 | Port P3 |
Port4 | Port P4 |
Port5 | Port P5 |
Port6 | Port P6 |
Pulldown | Pull typestate for pulldown inputs |
Pullup | Pull typestate for pullup inputs |
PxIV | Interrupt vector register used to determine which pin caused a port ISR |
Enums
GpioVector | Indicates which pin on the GPIO port caused the ISR. |
Traits
GpioFunction | Marker trait for GPIO typestates representing pins in GPIO (non-alternate) state |
GpioPort | Trait implemented on PAC GPIO types to map the PAC type to its respective port number type |
IntrPortNum | Marker trait for all Ports that support interrupts |
PinNum | Trait that encompasses all |
PortNum | Trait that encompasses all |