1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-13 13:29:50 +04:00

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

@@ -4,7 +4,7 @@
struct TextInput {
View* view;
osTimerId_t timer;
FuriTimer* timer;
};
typedef struct {
@@ -310,7 +310,7 @@ static void text_input_handle_ok(TextInput* text_input, TextInputModel* model, b
(!model->validator_callback(
model->text_buffer, model->validator_text, model->validator_callback_context))) {
model->valadator_message_visible = true;
osTimerStart(text_input->timer, osKernelGetTickFreq() * 4);
furi_timer_start(text_input->timer, furi_kernel_get_tick_frequency() * 4);
} else if(model->callback != 0 && text_length > 0) {
model->callback(model->callback_context);
}
@@ -438,7 +438,7 @@ TextInput* text_input_alloc() {
view_set_draw_callback(text_input->view, text_input_view_draw_callback);
view_set_input_callback(text_input->view, text_input_view_input_callback);
text_input->timer = osTimerNew(text_input_timer_callback, osTimerOnce, text_input, NULL);
text_input->timer = furi_timer_alloc(text_input_timer_callback, FuriTimerTypeOnce, text_input);
with_view_model(
text_input->view, (TextInputModel * model) {
@@ -460,11 +460,11 @@ void text_input_free(TextInput* text_input) {
});
// Send stop command
osTimerStop(text_input->timer);
furi_timer_stop(text_input->timer);
// Wait till timer stop
while(osTimerIsRunning(text_input->timer)) osDelay(1);
while(furi_timer_is_running(text_input->timer)) furi_delay_tick(1);
// Release allocated memory
osTimerDelete(text_input->timer);
furi_timer_free(text_input->timer);
view_free(text_input->view);