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:
@@ -65,13 +65,13 @@ static void text_box_test_render_callback(Canvas* canvas, void* ctx) {
|
||||
}
|
||||
|
||||
static void text_box_test_input_callback(InputEvent* input_event, void* ctx) {
|
||||
osMessageQueueId_t event_queue = ctx;
|
||||
osMessageQueuePut(event_queue, input_event, 0, osWaitForever);
|
||||
FuriMessageQueue* event_queue = ctx;
|
||||
furi_message_queue_put(event_queue, input_event, FuriWaitForever);
|
||||
}
|
||||
|
||||
int32_t text_box_test_app(void* p) {
|
||||
UNUSED(p);
|
||||
osMessageQueueId_t event_queue = osMessageQueueNew(32, sizeof(InputEvent), NULL);
|
||||
FuriMessageQueue* event_queue = furi_message_queue_alloc(32, sizeof(InputEvent));
|
||||
furi_check(event_queue);
|
||||
|
||||
TextBoxTestState _state = {.idx = 0};
|
||||
@@ -93,7 +93,7 @@ int32_t text_box_test_app(void* p) {
|
||||
|
||||
uint32_t test_renders_num = COUNT_OF(text_box_test_render);
|
||||
InputEvent event;
|
||||
while(osMessageQueueGet(event_queue, &event, NULL, osWaitForever) == osOK) {
|
||||
while(furi_message_queue_get(event_queue, &event, FuriWaitForever) == FuriStatusOk) {
|
||||
TextBoxTestState* state = acquire_mutex_block(&state_mutex);
|
||||
|
||||
if(event.type == InputTypeShort) {
|
||||
@@ -118,7 +118,7 @@ int32_t text_box_test_app(void* p) {
|
||||
// remove & free all stuff created by app
|
||||
gui_remove_view_port(gui, view_port);
|
||||
view_port_free(view_port);
|
||||
osMessageQueueDelete(event_queue);
|
||||
furi_message_queue_free(event_queue);
|
||||
delete_mutex(&state_mutex);
|
||||
|
||||
furi_record_close("gui");
|
||||
|
||||
Reference in New Issue
Block a user