[−][src]Module itsybitsy_m0::gpio::v1
Version 1 of the GPIO module
This module is a compatibility shim that allows existing code to use the new v2 module. This API will eventually be deprecated and removed. The remaining documentation in this module comes from the prior implementation of the GPIO module.
Working with GPIO pins. The pins are associated with the PORT hardware. This module defines a split method on the PORT type that is used to safely reference the individual pin configuration. The IO pins can be switched into alternate function modes, which routes the pins to different peripherals depending on the mode for the pin. The pin configuration is reflected through the use of type states to make the interface (ideally, or at least practically) impossible to misuse.
Structs
Parts | Holds the GPIO Port peripheral and broken out pin instances |
Pin | Represents a GPIO pin with a corresponding |
Port | Opaque port reference |
Traits
GpioExt | The GpioExt trait allows splitting the PORT hardware into its constituent pin parts. |
IntoFunction | A trait that makes it easier to generically manage
converting a pin from its current state into some
other functional mode. The configuration change
requires exclusive access to the Port hardware,
which is why this isn't simply the standard |
PinMode | Type-level |
Type Definitions
Floating | Floating Input |
Input | Represents a pin configured for input.
The MODE type is typically one of |
OpenDrain | Open drain output.
The SAMD5x/E5x chips don't actually have open drain outputs.
This option was added by mistake. It is currently an alias of |
Output | Represents a pin configured for output.
The MODE type is typically one of |
Pa0 | Represents the IO pin with the matching name |
Pa1 | Represents the IO pin with the matching name |
Pa2 | Represents the IO pin with the matching name |
Pa3 | Represents the IO pin with the matching name |
Pa4 | Represents the IO pin with the matching name |
Pa5 | Represents the IO pin with the matching name |
Pa6 | Represents the IO pin with the matching name |
Pa7 | Represents the IO pin with the matching name |
Pa8 | Represents the IO pin with the matching name |
Pa9 | Represents the IO pin with the matching name |
Pa10 | Represents the IO pin with the matching name |
Pa11 | Represents the IO pin with the matching name |
Pa12 | Represents the IO pin with the matching name |
Pa13 | Represents the IO pin with the matching name |
Pa14 | Represents the IO pin with the matching name |
Pa15 | Represents the IO pin with the matching name |
Pa16 | Represents the IO pin with the matching name |
Pa17 | Represents the IO pin with the matching name |
Pa18 | Represents the IO pin with the matching name |
Pa19 | Represents the IO pin with the matching name |
Pa20 | Represents the IO pin with the matching name |
Pa21 | Represents the IO pin with the matching name |
Pa22 | Represents the IO pin with the matching name |
Pa23 | Represents the IO pin with the matching name |
Pa24 | Represents the IO pin with the matching name |
Pa25 | Represents the IO pin with the matching name |
Pa27 | Represents the IO pin with the matching name |
Pa28 | Represents the IO pin with the matching name |
Pa30 | Represents the IO pin with the matching name |
Pa31 | Represents the IO pin with the matching name |
Pb2 | Represents the IO pin with the matching name |
Pb3 | Represents the IO pin with the matching name |
Pb8 | Represents the IO pin with the matching name |
Pb9 | Represents the IO pin with the matching name |
Pb10 | Represents the IO pin with the matching name |
Pb11 | Represents the IO pin with the matching name |
Pb22 | Represents the IO pin with the matching name |
Pb23 | Represents the IO pin with the matching name |
PfA | Peripheral Function A |
PfB | Peripheral Function B |
PfC | Peripheral Function C |
PfD | Peripheral Function D |
PfE | Peripheral Function E |
PfF | Peripheral Function F |
PfG | Peripheral Function G |
PfH | Peripheral Function H |
PullDown | Pulled down Input |
PullUp | Pulled up Input |
PushPull | Totem Pole aka Push-Pull |
ReadableOpenDrain | Open drain output, which can be read when not driven
The SAMD5x/E5x chips don't actually have open drain outputs.
This option actually represents a readable |