Skip to main content

io_write

Macro io_write 

Source
macro_rules! io_write {
    (@parse [$io:expr] [$($proj:tt)*] [, $val:expr]) => { ... };
    (@parse [$io:expr] [$($proj:tt)*] [.$field:tt $($rest:tt)*]) => { ... };
    (@parse [$io:expr] [$($proj:tt)*] [[$flavor:ident: $index:expr] $($rest:tt)*]) => { ... };
    ($io:expr, $($rest:tt)*) => { ... };
}
Expand description

Writes to I/O memory.

The syntax is of form io_write!(io, proj, val) where io is an expression to a type that implements Io and proj is a projection specification, and val is the value to be written to the projected location.

ยงExamples

#[repr(C)]
struct MyStruct { field: u32, }

// let mmio: Mmio<'_, [MyStruct]>;
kernel::io::io_write!(mmio, [try: 2].field, 10);