storage_sd_api.h 597 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include <furi.h>
  3. #include "filesystem_api_defines.h"
  4. #include <fatfs.h>
  5. #include "storage_glue.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #define SD_LABEL_LENGTH 34
  10. typedef enum {
  11. FST_FAT12 = FS_FAT12,
  12. FST_FAT16 = FS_FAT16,
  13. FST_FAT32 = FS_FAT32,
  14. FST_EXFAT = FS_EXFAT,
  15. } SDFsType;
  16. typedef struct {
  17. SDFsType fs_type;
  18. uint32_t kb_total;
  19. uint32_t kb_free;
  20. uint16_t cluster_size;
  21. uint16_t sector_size;
  22. char label[SD_LABEL_LENGTH];
  23. FS_Error error;
  24. } SDInfo;
  25. const char* sd_api_get_fs_type_text(SDFsType fs_type);
  26. #ifdef __cplusplus
  27. }
  28. #endif