feat: embassy-boot for rp2040
Add embassy-boot support for RP2040, with examples for the Raspberry Pi Pico. Co-authored-by: Mathias Koch <mk@blackbird.online>
This commit is contained in:
@ -59,6 +59,11 @@ impl<'d, T: Instance, const FLASH_SIZE: usize> Flash<'d, T, FLASH_SIZE> {
|
||||
}
|
||||
|
||||
pub fn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Error> {
|
||||
trace!(
|
||||
"Reading from 0x{:x} to 0x{:x}",
|
||||
FLASH_BASE + offset as usize,
|
||||
FLASH_BASE + offset as usize + bytes.len()
|
||||
);
|
||||
check_read(self, offset, bytes.len())?;
|
||||
|
||||
let flash_data = unsafe { core::slice::from_raw_parts((FLASH_BASE as u32 + offset) as *const u8, bytes.len()) };
|
||||
|
Reference in New Issue
Block a user