Module arduino_hal::port
source · Expand description
GPIO & Pin control.
This module contains a Pins
struct which represents all pins of the board. The Pins
struct is most easily constructed using the arduino_hal::pins!()
macro:
let dp = arduino_hal::Peripherals::take().unwrap();
let pins = arduino_hal::pins!(dp);
Additionally, the mode
submodule contains all valid types for the MODE
generic parameter
of a pin. The Pin
type-alias represents a pin which can represent any of the pins
dynamically (while usually each pin has its own type).
Check the documentation for avr_hal_generic::port::Pin
for a detailed explanation of GPIO
pins in avr-hal
.
Modules§
- GPIO pin modes
Structs§
- Pins of the Arduino Uno, Arduino Nano, SparkFun ProMini 3.3V (8Mhz), and SparkFun ProMini 5V (16MHz).
Traits§
Type Aliases§
A0
A1
A2
A3
A4
A5
D0
/RX
D1
/TX
D2
D3
D4
D5
D6
D7
D8
D9
D10
D11
D12
D13
- Type-alias for a pin type which can represent any concrete pin.