1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
//! Hardware pins for the Teensy 4.0 and 4.1 boards //! //! `teensy4-pins` is designed to the [`imxrt-iomuxc`] crate. The pins API constrains //! the processor pads to the ones that are available on the Teensy 4.0 and 4.1. It also //! exposes type aliases that simplify pin identification in the type system. //! //! [`imxrt-iomuxc`]: https://docs.rs/imxrt-iomuxc/0.1/imxrt_iomuxc/ //! //! Note that this pin API is optional. You are free to configure the pins using the //! pad identifiers, instead of the physical pin identifiers. Pads are available directly //! from the `imxrt-iomuxc` crate. //! //! # Teensy 4.0 //! //! To acquire Teensy 4.0 pins, call `t40::into_pins` and provide all //! of the processor pads: //! //! ``` //! use teensy4_pins::t40; //! # use imxrt_iomuxc::imxrt106x::Pads; //! //! let pads = // Handle to all processor pads //! # unsafe { Pads::new() }; //! let pins = t40::into_pins(pads); //! ``` //! //! # Teensy 4.1 //! //! The approach is the same as the Teensy 4.0, replacing `t40` with `t41`: //! //! ``` //! use teensy4_pins::t41; //! # use imxrt_iomuxc::imxrt106x::Pads; //! //! let pads = // Handle to all processor pads //! # unsafe { Pads::new() }; //! let pins = t41::into_pins(pads); //! ``` //! //! # Safety //! //! The safe APIs expect to work on the only instance of the processor pads. If you don't have that //! available, or you need more flexibility, use the unsafe [`t40::Pin::new`](t40/struct.Pins.html#method.new) //! or [`t41::Pins::new`](t41/struct.Pins.html#method.new) constructor methods to create an instance //! that may be aliasing another handle to the pads or pins. #![no_std] pub mod common; pub mod t40; pub mod t41; mod iomuxc { pub use imxrt_iomuxc::imxrt106x::*; pub use imxrt_iomuxc::prelude::*; }