[][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 port Px, use the bounds Pin<Px, 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

P1

P1

P2

P2

P3

P3

P4

P4

P5

P5

P6

P6

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

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

IntrPortNum

Marker trait for all Ports that support interrupts

PinNum

Trait that encompasses all Pinx types for specifying a pin number.

PortNum

Marker trait that encompasses all GPIO port types

ToAlternate1

Marker trait for all Pins that have alternate function 1 available

ToAlternate2

Marker trait for all Pins that have alternate function 2 available

ToAlternate3

Marker trait for all Pins that have alternate function 3 available