๐๏ธ Peripherals โ
The peripherals crate defines shared data types used to configure and interact with low-level peripherals.
It currently focuses on pin modeling primitives (direction, level, pull mode, and compact data representation) that can be exchanged safely between layers.
Features โ
Direction,Level, andPullenums for portable pin state modeling.PinDatastructure to bundle optional pin attributes in one payload.- Byte-slice conversion helpers for device-facing buffers.
- Compact C-compatible representation (
repr(C)/repr(u8)), useful for control payloads.
API snapshot โ
PinData::new(...)and setter/getter methods.TryFrom<&[u8]>/TryFrom<&mut [u8]>for validated binary view conversion.AsMut<[u8]>for writing structured pin data into control buffers.
Dependencies โ
This crate is intentionally dependency-light.
Known limitations โ
- Current scope is focused on pin modeling; broader peripheral abstractions are intentionally out of this crate for now.