-
Notifications
You must be signed in to change notification settings - Fork 7.6k
drivers: disk: add fakefat disk driver #62286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@petejohanson You might find it useful for your fancy stuff. |
Interesting.. possibly useful for some of our testing scenarios or development with the posix targets. |
9843489
to
5e5d632
Compare
Fakefat disk emulates a disk formatted with the FAT file system. The driver supports FAT16 and FAT32 emulation and multiple instances. A backend can register at least 15 emulated files on a disk instance. The file structure contain read and write callbacks that are called when the filesystem driver accesses the volume. A backend can have multiple files with read callbacks, but usually only one or zero with write callbacks. Fakefat disk can be used for testing or to map services such as firmware updates to a file on the emulated disk. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add FAT16 and FAT32 tests for the FFAT disk using ELM FAT file system support. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This sample has two volumes, FAT16 and FAT32, exported via new USB device MSC support. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
5e5d632
to
af3be53
Compare
When the host reorders the files, e.g. deletes a file and then creates a new one things will break.
Code is written for humans. It is annoying when something that can be mistaken as a typo has some very special meaning behind it. In my opinion longer names are generally better because such names avoid ambiguity and are especially helpful for newcomers. |
Fakefat disk emulates a disk formatted with the FAT file system.
The driver supports FAT16 and FAT32 emulation and multiple instances.
A backend can register at least 15 emulated files on a disk instance.
The file structure contain read and write callbacks that are called
when the filesystem driver accesses the volume. A backend can have
multiple files with read callbacks, but usually only one or zero with
write callbacks.
Fakefat disk can be used for testing or to map services such as
firmware updates to a file on the emulated disk.
Complementary to #53798
TODO:
documentation