oxstack_drivers/lib.rs
1//! Chip drivers for M5Stack hardware.
2//!
3//! Every driver here is written against the portable `embedded-hal` /
4//! `embedded-hal-async` 1.0 traits, never against a concrete HAL. That keeps
5//! them testable on the host (see each module's tests) and reusable on any
6//! board that carries the same chip.
7//!
8//! Design rules shared by all drivers:
9//! - no allocation, no global state, no logging in hot paths;
10//! - the driver owns its bus handle; sharing a bus is the caller's job
11//! (e.g. `embassy-embedded-hal`'s `I2cDevice`);
12//! - register maps are private; the public API speaks in domain types.
13#![no_std]
14#![deny(unsafe_code)]
15#![warn(missing_docs)]
16
17#[cfg(doctest)]
18#[doc = include_str!("../README.md")]
19struct ReadmeDoctests;
20
21pub mod axes;
22#[cfg(feature = "bmi270")]
23pub mod bmi270;
24#[cfg(feature = "es8311")]
25pub mod es8311;
26#[cfg(feature = "st7789")]
27pub mod st7789;
28#[cfg(feature = "tca8418")]
29pub mod tca8418;
30
31#[cfg(test)]
32pub(crate) mod test_util;