Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion embedded-mcu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@ chrono = { version = "^0.4", default-features = false, optional = true }
defmt = { version = "1.0", optional = true }
embedded-hal = { workspace = true }
num_enum = { version = "0.7.5", default-features = false }
embedded-hal-async = "1.0.0"

[dev-dependencies]
proptest = "1.0.0"
tokio = { version = "1", features = ["macros", "rt", "time"] }
embedded-hal-mock = { version = "0.11", default-features = false, features = [
"eh1",
"embedded-hal-async",
] }
smbus-pec = { version = "1.0", default-features = false }

[features]
default = []

chrono = ["dep:chrono"]
defmt = ["dep:defmt"]
defmt = ["dep:defmt", "embedded-hal-async/defmt-03"]

[lints]
workspace = true
13 changes: 10 additions & 3 deletions embedded-mcu-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@
//! * **Device-agnostic** — no register addresses, magic values, or
//! MCU-specific types appear in any public API.
//!
//! * **Trait-only** — the crate ships no runtime code beyond the
//! [`time::Datetime`] value type and its helpers. Keeping implementations
//! out-of-crate means zero overhead: you only pay for what you use.
//! * **Mostly trait-only** — the crate is primarily a contract surface,
//! not a runtime. The only concrete runtime code shipped today is the
//! [`time::Datetime`] value type and its helpers, and a portable software
//! SMBus controller ([`smbus::bus::asynch::SwSmbusI2c`]) that layers the
//! SMBus protocol on top of any [`embedded_hal_async::i2c::I2c`]
//! implementation. Hardware-specific implementations of every trait
//! still belong in board or chip support crates, so generic drivers pay
//! only for what they use.
//!
//! * **`no_std` first** — every public item is usable in bare-metal firmware
//! with no heap allocator. The standard library is only linked during
Expand All @@ -45,6 +50,7 @@
//! |--------|----------------|
//! | [`time`] | Wall-clock date/time types and real-time clock (RTC) traits |
//! | [`nvram`] | Non-Volatile RAM storage traits |
//! | [`smbus`] | SMBus controller traits and a portable software implementation atop `embedded-hal-async` I²C |
//! | [`watchdog`] | Watchdog timer trait |
//!
//! # Optional Cargo features
Expand All @@ -70,5 +76,6 @@

pub mod i2c;
pub mod nvram;
pub mod smbus;
pub mod time;
pub mod watchdog;
Loading
Loading