picoem_common/divider.rs
1//! Per-core integer divider state — shared between RP2040 and RP2350.
2//!
3//! Same 32-bit signed/unsigned divider semantics on both chips
4//! (including division-by-zero behaviour). Compute routine stays on the
5//! chip-side `Sio` composition; this file lifts the data struct only.
6//! Fields were `pub` within the private `sio::mod` module; crossing the
7//! crate boundary promotes them to `pub` for cross-crate field access
8//! from chip SIO implementations.
9
10/// Per-core integer divider state (HLD §2.4).
11#[derive(Default, Clone, Copy)]
12pub struct Divider {
13 pub dividend: u32,
14 pub divisor: u32,
15 pub quotient: u32,
16 pub remainder: u32,
17 pub signed: bool,
18 pub dirty: bool,
19 pub reads_pending: u8,
20}