[FL-977] Internal Storage (#455)
* Add littlefs submodule * Furi: add mutex in logging, fix issues with corrupted printf * ApiHal: disable debug traces in ble glue * App-loader: more logs * Passport: fix invalid DolphinState usage * ApiHal, linker script: flash API is now aware of free space, complete abstraction layer for storage * Internal Storage: littlefs based storage services with key value API. Migrate dolphin state to new storage API.
This commit is contained in:
@@ -78,14 +78,14 @@ static void render_callback(Canvas* canvas, void* ctx) {
|
||||
}
|
||||
|
||||
int32_t passport(void* p) {
|
||||
DolphinState _state;
|
||||
DolphinState* dolphin_state = dolphin_state_alloc();
|
||||
ValueMutex state_mutex;
|
||||
dolphin_state_load(&_state);
|
||||
dolphin_state_load(dolphin_state);
|
||||
|
||||
osMessageQueueId_t event_queue = osMessageQueueNew(2, sizeof(AppEvent), NULL);
|
||||
furi_check(event_queue);
|
||||
|
||||
if(!init_mutex(&state_mutex, &_state, sizeof(DolphinState))) {
|
||||
if(!init_mutex(&state_mutex, dolphin_state, sizeof(DolphinState*))) {
|
||||
printf("[Passport] cannot create mutex\r\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -121,5 +121,7 @@ int32_t passport(void* p) {
|
||||
|
||||
osMessageQueueDelete(event_queue);
|
||||
|
||||
dolphin_state_free(dolphin_state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user