[FL-1307] iButton key files: ASCII encoding and .ibtn extension (#493)

* GUI module submenu: fix documentation
* GUI module submenu: add submenu_set_selected_item fn
* App iButton: use submenu_set_selected_item to store and set selected item in submenu
* App iButton: swap write and emulate in "saved key menu" scene
* App iButton: file select can now switch to the previous selected file
* App iButton: swap write and emulate indexes in "saved key menu" scene
* Gui module file_select: work with separate extension
* iButton app: separate file managment, file error handling
* SD card api: custom error message
* iButton app: better file error handling

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
SG
2021-05-27 02:50:16 +10:00
committed by GitHub
parent 63e9207c44
commit 7e6a97c3a3
11 changed files with 297 additions and 101 deletions

View File

@@ -174,7 +174,7 @@ typedef struct {
bool (*open)(File* file, const char* path, FS_AccessMode access_mode, FS_OpenMode open_mode);
bool (*close)(File* file);
uint16_t (*read)(File* file, void* buff, uint16_t bytes_to_read);
uint16_t (*write)(File* file, void* buff, uint16_t bytes_to_write);
uint16_t (*write)(File* file, const void* buff, uint16_t bytes_to_write);
bool (*seek)(File* file, uint32_t offset, bool from_start);
uint64_t (*tell)(File* file);
bool (*truncate)(File* file);

View File

@@ -17,6 +17,7 @@ typedef struct {
uint8_t result_size,
char* selected_filename);
void (*check_error)(SdApp* context);
void (*show_error)(SdApp* context, const char* error_text);
} SdCard_Api;
#ifdef __cplusplus