-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
littlefs2_prince_filesystemalways enables the entire PRINCE region 2 which can be problematic if this region is not used exclusively for the filesystem. It is hard to provide a correct and general implementation so I would transform this macro into an example that can be adapted depending on the use case.
lpc55-hal/src/drivers/flash.rs
Lines 527 to 532 in 53a86f7
self.prince.enable_region_2_for(||{ let flash: *const u8 = (Self::BASE_OFFSET + off) as *const u8; for i in 0 .. buf.len() { buf[i] = unsafe{ *flash.offset(i as isize) }; } }); littlefs2_filesystemcould just be a struct using const generics.
lpc55-hal/src/drivers/flash.rs
Line 395 in 53a86f7
macro_rules! littlefs2_filesystem {
Metadata
Metadata
Assignees
Labels
No labels