Skip to main content

spmi_read_contiguous

Macro spmi_read_contiguous 

Source
macro_rules! spmi_read_contiguous {
    (
        $regs:expr,
        $head:ident $(, $tail:ident )* $(,)?
    ) => { ... };
}
Expand description

Reads multiple contiguous registers in a single async call to the hardware.

§Module Names and Paths

The macro expects register module names available directly in scope (e.g. my_reg). Module paths (e.g. submod::my_reg) are not supported as variable binding identifiers.

§Arguments

  1. $regs:expr: The block struct instance.
  2. $head:ident $(, $tail:ident )*: The register modules to read.

§Examples

// Read both 'general' and 'status' registers together:
// let regs = MySpmiRegisters::new(spmi_proxy);
let (general_val, status_val) = spmi_read_contiguous!(
    &regs,
    my_reg,
    status_be_reg
).await?;