Expand description
§mmio Library API
This crate provides safe, concurrent access to 32-bit memory-mapped IO registers via /dev/mem. It is designed for use in CLI tools, controllers, and logging utilities that need direct register access.
§Example Usage
use mmreg::{read_register_at, write_register_at};
// Read a 32-bit value from a physical address
let value = read_register_at(0x4000_0000)?;
// Write a 32-bit value to a physical address
write_register_at(0x4000_0000, 0xDEADBEEF)?;Structs§
- Interface
- The main interface for managing mapped registers and safe access.
- Register
- Represents a 32-bit register with optional subregisters (bitfields).
- SubRegister
- Represents a 32-bit register with optional subregisters (bitfields).
Functions§
- read_
register_ at - Reads a 32-bit value from a physical address using /dev/mem.
- write_
register_ at - Writes a 32-bit value to a physical address using /dev/mem.