big refactoring and features added
This commit is contained in:
30
App/Services/storage_sd.h
Normal file
30
App/Services/storage_sd.h
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @file storage_sd.h
|
||||
* @brief Narrow SD-card storage wrapper built directly on FatFs.
|
||||
*
|
||||
* Architectural note:
|
||||
* An earlier storage layer mixed allocation-heavy tutorial helpers with
|
||||
* application-specific policies. This service now exposes only the minimal
|
||||
* file-oriented operations needed by profile loading and streamed profile
|
||||
* saving, while keeping FatFs details out of higher-level services.
|
||||
*/
|
||||
|
||||
#ifndef STORAGE_SD_H
|
||||
#define STORAGE_SD_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "ff.h"
|
||||
|
||||
bool storage_sd_is_available(void);
|
||||
FRESULT storage_sd_begin(void);
|
||||
FRESULT storage_sd_end(void);
|
||||
FRESULT storage_sd_read_bytes(const char *path, FSIZE_t offset, void *data, UINT size, UINT *bytes_read);
|
||||
FRESULT storage_sd_open_file(FIL *file, const char *path, BYTE mode);
|
||||
FRESULT storage_sd_close_file(FIL *file);
|
||||
FRESULT storage_sd_stat(const char *path, FILINFO *out_info);
|
||||
bool storage_sd_file_exists(const char *path);
|
||||
FRESULT storage_sd_make_directory(const char *path);
|
||||
FRESULT storage_sd_remove_file(const char *path);
|
||||
|
||||
#endif /* STORAGE_SD_H */
|
||||
Reference in New Issue
Block a user