storage_sd_api.h 777 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include <furi.h>
  3. #include "filesystem_api_defines.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define SD_LABEL_LENGTH 34
  8. typedef enum {
  9. FST_UNKNOWN,
  10. FST_FAT12,
  11. FST_FAT16,
  12. FST_FAT32,
  13. FST_EXFAT,
  14. } SDFsType;
  15. typedef struct {
  16. SDFsType fs_type;
  17. uint32_t kb_total;
  18. uint32_t kb_free;
  19. uint16_t cluster_size;
  20. uint16_t sector_size;
  21. char label[SD_LABEL_LENGTH];
  22. uint8_t manufacturer_id;
  23. char oem_id[3];
  24. char product_name[6];
  25. uint8_t product_revision_major;
  26. uint8_t product_revision_minor;
  27. uint32_t product_serial_number;
  28. uint8_t manufacturing_month;
  29. uint16_t manufacturing_year;
  30. FS_Error error;
  31. } SDInfo;
  32. const char* sd_api_get_fs_type_text(SDFsType fs_type);
  33. #ifdef __cplusplus
  34. }
  35. #endif