Furi: core refactoring and CMSIS removal part 2 (#1410)

* Furi: rename and move core
* Furi: drop CMSIS_OS header and unused api, partially refactor and cleanup the rest
* Furi: CMSIS_OS drop and refactoring.
* Furi: refactoring, remove cmsis legacy
* Furi: fix incorrect assert on queue deallocation, cleanup timer
* Furi: improve delay api, get rid of floats
* hal: dropped furi_hal_crc
* Furi: move DWT based delay to cortex HAL
* Furi: update core documentation

Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
あく
2022-07-20 13:56:33 +03:00
committed by GitHub
parent f9c2287ea7
commit e3c7201a20
264 changed files with 2569 additions and 3883 deletions

View File

@@ -51,7 +51,7 @@ Power* power_alloc() {
power->state = PowerStateNotCharging;
power->battery_low = false;
power->power_off_timeout = POWER_OFF_TIMEOUT;
power->api_mtx = osMutexNew(NULL);
power->api_mtx = furi_mutex_alloc(FuriMutexTypeNormal);
// Gui
power->view_dispatcher = view_dispatcher_alloc();
@@ -83,7 +83,7 @@ void power_free(Power* power) {
view_port_free(power->battery_view_port);
// State
osMutexDelete(power->api_mtx);
furi_mutex_free(power->api_mtx);
// FuriPubSub
furi_pubsub_free(power->event_pubsub);
@@ -138,10 +138,10 @@ static bool power_update_info(Power* power) {
info.temperature_charger = furi_hal_power_get_battery_temperature(FuriHalPowerICCharger);
info.temperature_gauge = furi_hal_power_get_battery_temperature(FuriHalPowerICFuelGauge);
osMutexAcquire(power->api_mtx, osWaitForever);
furi_mutex_acquire(power->api_mtx, FuriWaitForever);
bool need_refresh = power->info.charge != info.charge;
power->info = info;
osMutexRelease(power->api_mtx);
furi_mutex_release(power->api_mtx);
return need_refresh;
}
@@ -226,7 +226,7 @@ int32_t power_srv(void* p) {
furi_hal_power_check_otg_status();
}
osDelay(1000);
furi_delay_ms(1000);
}
power_free(power);