3 ms·
Can this do virtual files? For example if I turned a microcontroller into a false flash drive of sorts, and wanted to generate the contents of a file on the fly
by devwastaken 4y ago
Can this do virtual files? For example if I turned a microcontroller into a false flash drive of sorts, and wanted to generate the contents of a file on the fly and not have them at rest in a FAT system.
- jetrink 4y agoThis isn't really the tool for that. With FatFS, you provide a way to interact with the storage medium (disk read/write and so forth) and FatFS handles everything at the filesystem level (file open, directory listing, etc.) It would be much easier to emulate a filesystem (perhaps even copying parts of FatFS' API) than it would be to emulate a virtual disk and and access it at arm's length with FatFS.
- 10000truths 4y agoFrom the website: FatFs controls the storage devices via a simple media access interface shown below. disk_status - Get device status disk_initialize - Initialize device disk_read - Read data disk_write - Write data disk_ioctl - Control device dependent functions get_fattime - Get current time For your use case, you'd probably have to implement the disk_read method to dynamically generate and return your content based on the start and end sectors provided as parameters.