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:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user