Hackathone session: bugfixes and documentation update (#869)

* ReadMe: update flashing scripts section
* Furi: add record exists method to record store.
* FuriHal: early OS init and i2c timeouts based on os ticks.
* Storage: replace malloc with furi_alloc, fix errors found by pvs.
* iButton: properly handle shutdown in cli search command
* SubGhz: proper argument type in sscanf and incorrect position of logging in switch.
This commit is contained in:
あく
2021-12-05 14:47:02 +03:00
committed by GitHub
parent 4b8653e061
commit 98bc190ac4
14 changed files with 200 additions and 132 deletions

View File

@@ -52,6 +52,24 @@ static void furi_record_unlock() {
furi_check(osMutexRelease(furi_record->mutex) == osOK);
}
bool furi_record_exists(const char* name) {
furi_assert(furi_record);
furi_assert(name);
bool ret = false;
string_t name_str;
string_init_set_str(name_str, name);
furi_record_lock();
ret = (FuriRecordDataDict_get(furi_record->records, name_str) != NULL);
furi_record_unlock();
string_clear(name_str);
return ret;
}
void furi_record_create(const char* name, void* data) {
furi_assert(furi_record);