arduino_hal/port/
mod.rs

1//! GPIO & Pin control.
2//!
3//! This module contains a [`Pins`] struct which represents all pins of the board.  The [`Pins`]
4//! struct is most easily constructed using the [`arduino_hal::pins!()`][crate::pins] macro:
5//!
6//! ```no_run
7//! let dp = arduino_hal::Peripherals::take().unwrap();
8//! let pins = arduino_hal::pins!(dp);
9//! ```
10//!
11//! Additionally, the [`mode`] submodule contains all valid types for the `MODE` generic parameter
12//! of a pin.  The [`Pin`] type-alias represents a pin which can represent _any_ of the pins
13//! dynamically (while usually each pin has its own type).
14//!
15//! Check the documentation for [`avr_hal_generic::port::Pin`] for a detailed explanation of GPIO
16//! pins in `avr-hal`.
17
18#[cfg(feature = "arduino-diecimila")]
19mod diecimila;
20#[cfg(feature = "arduino-diecimila")]
21pub use diecimila::*;
22#[cfg(feature = "arduino-leonardo")]
23mod leonardo;
24#[cfg(feature = "arduino-leonardo")]
25pub use leonardo::*;
26#[cfg(any(feature = "arduino-mega2560", feature = "arduino-mega1280"))]
27mod mega;
28#[cfg(any(feature = "arduino-mega2560", feature = "arduino-mega1280"))]
29pub use mega::*;
30#[cfg(any(
31    feature = "arduino-nano",
32    feature = "arduino-uno",
33    feature = "nano168",
34    feature = "sparkfun-promini-3v3",
35    feature = "sparkfun-promini-5v"
36))]
37mod uno;
38#[cfg(any(
39    feature = "arduino-nano",
40    feature = "arduino-uno",
41    feature = "nano168",
42    feature = "sparkfun-promini-3v3",
43    feature = "sparkfun-promini-5v"
44))]
45pub use uno::*;
46#[cfg(feature = "sparkfun-promicro")]
47mod promicro;
48#[cfg(feature = "sparkfun-promicro")]
49pub use promicro::*;
50#[cfg(feature = "trinket-pro")]
51mod trinket_pro;
52#[cfg(feature = "trinket-pro")]
53pub use trinket_pro::*;
54#[cfg(feature = "trinket")]
55mod trinket;
56#[cfg(feature = "trinket")]
57pub use trinket::*;