23#define CODE_VERSION "0.2.0"
37#define HAL_FS_DISK_ERR 1
42#define HAL_FS_INT_ERR 2
47#define HAL_FS_NOT_READY 3
52#define HAL_FS_NO_FILE 4
57#define HAL_FS_NO_PATH 5
62#define HAL_FS_INVALID_NAME 6
67#define HAL_FS_ACCESS_DENY 7
72#define HAL_FS_ALRDY_EXISTS 8
77#define HAL_FS_INVALID_OBJ 9
82#define HAL_FS_NOT_ENABLED 10
87#define HAL_FS_NO_FS 11
92#define HAL_FS_MKFS_ABORTED 12
97#define HAL_FS_TIMEOUT 13
102#define HAL_FS_LOCKED 14
107#define HAL_FS_NOT_ENOUGH_M 15
112#define HAL_FS_TOO_MANY_OPN 16
117#define HAL_FS_INVALID_PARM 17
122#define HAL_FS_WRITE_PROT 18
127#define HAL_FS_INVALID_DRIV 19
132#define HAL_FS_DOUBLE_OPEN 20
137#define HAL_FS_UNKNOWN_ERR 21
143#define HAL_FLASH_OUT_OF_BOUNDS 22
148#define HAL_FLASH_BAD_INTEGRITY 23
153#define HAL_USB_CANNOT_INITIALIZE 24
160#define HAL_FS_MAX_OPEN_FILES 16
168#define HAL_FS_MAX_OPEN_DIRS 4
174#define HAL_SD_USE_HW_CD false
uint8_t HAL_ERROR
This type represents a HAL_* error. See the defines in the file to read up on them.
Definition shared.h:31
const char * HAL_ERROR_to_str(HAL_ERROR errno)
Turns provided errno into a string for logging/debugging.
Definition shared.c:6
Struct to hold disk information.
Definition shared.h:252
uint32_t _internal_blocksize
Definition shared.h:260
bool is_externally_writable
Definition shared.h:254
bool(* _internal_write_fp)(uint32_t, uint32_t, uint8_t *)
Definition shared.h:259
void * _internal_fsp
Definition shared.h:257
void * _internal_sdp
Definition shared.h:256
HAL_ERROR errno
Definition shared.h:265
uint32_t _internal_sectorcount
Definition shared.h:261
bool disk_mounted
Definition shared.h:253
bool(* _internal_read_fp)(uint32_t, uint32_t, void *)
Definition shared.h:258
Directory struct used in directory operations.
Definition shared.h:228
HAL_ERROR errno
Definition shared.h:238
bool _internal_has_dir
Definition shared.h:235
uint16_t fdate
Definition shared.h:230
void * _internal_dp
Definition shared.h:234
uint16_t ftime
Definition shared.h:231
uint8_t dattrs
Definition shared.h:229
File struct to be used in file operations.
Definition shared.h:197
void * _internal_fp
Definition shared.h:206
char * filename
Definition shared.h:199
uint8_t fattrs
Definition shared.h:201
uint16_t ftime
Definition shared.h:203
HAL_ERROR errno
Definition shared.h:210
uint16_t fdate
Definition shared.h:202
bool _internal_has_file
Definition shared.h:207
size_t fsize
Definition shared.h:200