FAT32 FileSystem Library

文章目录

Github

crates.io version

This is FAT32 FileSystem Library, which is #![no_std] and does not use alloc.

Test passed with sdio_sdhc and WindowsAPI.

Supported Features

  • [x] Read
  • [x] Create File AND Dir
  • [x] Write(OverWritten and Append)
  • [x] Delete File AND DIR

Questions

My Device Support std, Can I Use This Crate?

Of course you can, but I don’t recommend it. You should use std::fs::File OR other crates.

Why Do You Write This Crate?

In order to support devices and environment which don’t have std, like
* Embedded Device
* Bootloader

Have More Examples?

How To Test (Only Windows)

  • EDIT mount() function in lib.rs, change disk like \\\\.\\E:
  • cargo test

How To Use

You need make your library implement BlockDevice trait:

For example, I use my another library sdio_sdhc to implement:

Now sdio_sdhc library supported fat32 filesystem.
Then, add fat32 library to your application

If your card block is other size, like 1024 Bytes

Then, you can do some tests

If all goes well, the file was created with 1234 Bytes in root dir.

原文链接:,转发请注明来源!

发表评论