Skip to content

Remove littlefs2 macros #72

Open
Open
@robin-nitrokey

Description

@robin-nitrokey
  • littlefs2_prince_filesystem always 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.
    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_filesystem could just be a struct using const generics.
    macro_rules! littlefs2_filesystem {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions