[−][src]Module arduino_mkrzero::gpio
GPIO
The GPIO module is used to configure GPIO pins through the PORT interface.
Versions
There are currently two versions of the GPIO module. The inital GPIO API was based on a macro-heavy implementation. The discussion in issue #214 spurred the creation of a new module with less macro-use and a refactored API.
The new module is provided in v2. The old module was removed, but a compatibility shim is provided in v1 to support existing code.
Migration
The v2 module will eventually replace v1. New users are encouraged to
use v2 instead of v1. Existing code should expect to migrate to v2
before this crate reaches 1.0
.
Modules
v1 | Version 1 of the GPIO module |
v2 | Version 2 of the GPIO module |
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 |