Fix end address for assertion

This commit is contained in:
Rasmus Melchior Jacobsen
2023-05-25 22:48:54 +02:00
parent 41a632a56c
commit 88543445d8
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ pub(super) fn blocking_read(base: u32, size: u32, offset: u32, bytes: &mut [u8])
let start_address = base + offset;
#[cfg(flash_f4)]
family::assert_not_corrupted_read(start_address + bytes.len());
family::assert_not_corrupted_read(start_address + bytes.len() as u32);
let flash_data = unsafe { core::slice::from_raw_parts(start_address as *const u8, bytes.len()) };
bytes.copy_from_slice(flash_data);