fat32
This is a simple fat32 filesystem library, which is #![no_std]
and does not use alloc
.
Only test sdhc card with sdio_sdhc.
This is a personal project, your issues may not be resolved in time.
Support
- create file and dir
- read and write file
Will Support
- append file
- delete file and dir
- format
How to use
You need make your library implement BasicOperation
trait:
For example, I use my another library sdio_sdhc to implement:
Now sdio_sdhc library can support fat32 filesystem. Then, add fat32 library to your application
# if no feature, the BUFFER_SIZE is 512 Bytes
fat32 = { version = "0.1" }
If your card block is other size, like 1024 Bytes
fat32 = { version = "0.1", features = ["1024"] }
Then, you can do some tests
// Card from sdio_sdhc
let card = init.unwrap;
// Volume from fat32
let cont = new;
// into root dir
let root = cont.root_dir;
// create file named test.txt
root.create_file.unwrap;
// load file
let mut file = root.load_file.unwrap;
// write buffer to file
file.write.unwrap;
If all goes well, the file was created with 4608 Bytes in root dir.