Non-blocking crate for interacting with Microchip SST25 flash memory devices like SST25VF080B.
Currently, the following features are implemented: * Reading memory * Writing single bytes * Auto-address-increment writes * Full chip erase * Reading status * Writing status
For all details see monitor module.
````Rust use mcsst25::device::Flash; use mcsst25::example::{MockBus, MockPin};
let bus = MockBus::default(); let pinen = MockPin::default(); let pinhold = MockPin::default(); let pin_wp = MockPin::default();
let mut device = Flash::new(bus, pinen, pinwp, pin_hold);
// Writing a single byte device.erasefull().unwrap(); device.byteprogram(0x0, 0x66).unwrap();
// Writing larger data device.aai_program(0x1, &[0x1, 0x2, 0x3, 0x4]).unwrap();
// Reading data starting at address 0x0 let data = device.read::<5>(0x0).unwrap(); assert_eq!([0x66, 0x1, 0x2, 0x3, 0x4], data); ````
:warning: The crate has only been tested for the SST25VF080B variant.
Any form of support is greatly appreciated. Feel free to create issues and PRs. See DEVELOPMENT for more details.
Licensed under either of
Each contributor agrees that his/her contribution covers both licenses.