Skip to main content

picoem_common/
lib.rs

1//! Chip-agnostic primitives shared by `rp2040_emu` and `rp2350_emu`.
2//!
3//! See `wrk_docs/2026.04.14 - HLD - mdpicoem Workspace Restructure.md` for
4//! the split policy: common owns *primitives* (types and pure functions);
5//! chip crates own *composed structures* that mix chip-specific state with
6//! those primitives.
7
8pub mod clock;
9pub mod clocks;
10pub mod divider;
11pub mod fifo;
12pub mod memory;
13pub mod pacer;
14pub mod pio;
15// Thread-coordination primitives (Dual-execution HLD V1 §6.4 step 1).
16// Inner `#![cfg(...)]` on `threaded/mod.rs` gates the platform surface;
17// the submodule declaration itself is unconditional.
18pub mod threaded;
19
20pub use self::clock::Clock;
21pub use self::clocks::{ClockTree, ROSC_FREQ_HZ, XOSC_FREQ_HZ, pll_output_hz};
22pub use self::divider::Divider;
23pub use self::fifo::Fifo;
24pub use self::memory::{Memory, ROM_SIZE, SRAM_SIZE};
25#[cfg(target_arch = "x86_64")]
26pub use self::pacer::Pacer;
27pub use self::pacer::{PacerSnapshot, PacerStats};
28pub use self::pio::PioBlock;
29
30// Former `Peripheral` trait removed — zero impls workspace-wide.
31// See `wrk_docs/2026.04.15 - HLD - RP2040 Peripheral Coverage V7.md`
32// §5.1 for the inherent-methods convention that replaces it.