mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
[FL-3841] FuriEventLoop Pt.2 (#3703)
* Abstract primitive type from main logic in FuriEventLoop * Remove message_queue_i.h * Add stream buffer support for event loop * Add semaphore support for event loop * Add temporary unit test workaround * Make the linter happy * Add mutex support for event loop * Implement event subscription and unsubscription while the event loop is running * Implement edge events * Fix leftover logical errors * Add event loop timer example application * Implement flag-based edge trigger and one-shot mode * Add event loop mutex example application * Only notify the event loop if stream buffer is at or above its trigger level * Reformat comments * Add event loop stream buffer example application * Add event loop multiple elements example application * Improve event loop flag names * Remove redundant signal handler as it is already handled by the event loop * Refactor Power service, improve ViewHolder * Use ViewHolder instead of ViewDispatcher in About app * Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue() * Remove all invocations of view_dispatcher_enable_queue() * Remove app-scened-template * Remove missing library from target.json * Port Accessor app to ViewHolder * Make the linter happy * Add example_view_holder application, update ViewHolder docs * Add example_view_dispatcher application, update ViewDispatcher docs * Replace FuriSemaphore with FuriApiLock, remove workaround delay * Fix logical error * Fix another logical error * Use the sources directive to speed up compilation * Use constant define macro * Improve FuriEventLoop documentation * Improve FuriEventLoop documentation once more * Bump API Version * Gui: remove redundant checks from ViewDispatcher * Gui: remove dead ifs from ViewDispatcher Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,71.0,,
|
||||
Version,+,72.0,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
@@ -1108,11 +1108,13 @@ Function,+,furi_event_flag_set,uint32_t,"FuriEventFlag*, uint32_t"
|
||||
Function,+,furi_event_flag_wait,uint32_t,"FuriEventFlag*, uint32_t, uint32_t, uint32_t"
|
||||
Function,+,furi_event_loop_alloc,FuriEventLoop*,
|
||||
Function,+,furi_event_loop_free,void,FuriEventLoop*
|
||||
Function,+,furi_event_loop_message_queue_subscribe,void,"FuriEventLoop*, FuriMessageQueue*, FuriEventLoopEvent, FuriEventLoopMessageQueueCallback, void*"
|
||||
Function,+,furi_event_loop_message_queue_unsubscribe,void,"FuriEventLoop*, FuriMessageQueue*"
|
||||
Function,+,furi_event_loop_pend_callback,void,"FuriEventLoop*, FuriEventLoopPendingCallback, void*"
|
||||
Function,+,furi_event_loop_run,void,FuriEventLoop*
|
||||
Function,+,furi_event_loop_stop,void,FuriEventLoop*
|
||||
Function,+,furi_event_loop_subscribe_message_queue,void,"FuriEventLoop*, FuriMessageQueue*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_subscribe_mutex,void,"FuriEventLoop*, FuriMutex*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_subscribe_semaphore,void,"FuriEventLoop*, FuriSemaphore*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_subscribe_stream_buffer,void,"FuriEventLoop*, FuriStreamBuffer*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_tick_set,void,"FuriEventLoop*, uint32_t, FuriEventLoopTickCallback, void*"
|
||||
Function,+,furi_event_loop_timer_alloc,FuriEventLoopTimer*,"FuriEventLoop*, FuriEventLoopTimerCallback, FuriEventLoopTimerType, void*"
|
||||
Function,+,furi_event_loop_timer_free,void,FuriEventLoopTimer*
|
||||
@@ -1122,6 +1124,7 @@ Function,+,furi_event_loop_timer_is_running,_Bool,const FuriEventLoopTimer*
|
||||
Function,+,furi_event_loop_timer_restart,void,FuriEventLoopTimer*
|
||||
Function,+,furi_event_loop_timer_start,void,"FuriEventLoopTimer*, uint32_t"
|
||||
Function,+,furi_event_loop_timer_stop,void,FuriEventLoopTimer*
|
||||
Function,+,furi_event_loop_unsubscribe,void,"FuriEventLoop*, FuriEventLoopObject*"
|
||||
Function,+,furi_get_tick,uint32_t,
|
||||
Function,+,furi_hal_adc_acquire,FuriHalAdcHandle*,
|
||||
Function,+,furi_hal_adc_configure,void,FuriHalAdcHandle*
|
||||
@@ -1544,6 +1547,7 @@ Function,+,furi_semaphore_acquire,FuriStatus,"FuriSemaphore*, uint32_t"
|
||||
Function,+,furi_semaphore_alloc,FuriSemaphore*,"uint32_t, uint32_t"
|
||||
Function,+,furi_semaphore_free,void,FuriSemaphore*
|
||||
Function,+,furi_semaphore_get_count,uint32_t,FuriSemaphore*
|
||||
Function,+,furi_semaphore_get_space,uint32_t,FuriSemaphore*
|
||||
Function,+,furi_semaphore_release,FuriStatus,FuriSemaphore*
|
||||
Function,+,furi_stream_buffer_alloc,FuriStreamBuffer*,"size_t, size_t"
|
||||
Function,+,furi_stream_buffer_bytes_available,size_t,FuriStreamBuffer*
|
||||
@@ -2282,7 +2286,7 @@ Function,+,power_get_info,void,"Power*, PowerInfo*"
|
||||
Function,+,power_get_pubsub,FuriPubSub*,Power*
|
||||
Function,+,power_is_battery_healthy,_Bool,Power*
|
||||
Function,+,power_off,void,Power*
|
||||
Function,+,power_reboot,void,PowerBootMode
|
||||
Function,+,power_reboot,void,"Power*, PowerBootMode"
|
||||
Function,+,powf,float,"float, float"
|
||||
Function,-,powl,long double,"long double, long double"
|
||||
Function,+,pretty_format_bytes_hex_canonical,void,"FuriString*, size_t, const char*, const uint8_t*, size_t"
|
||||
@@ -2757,11 +2761,11 @@ Function,+,view_holder_alloc,ViewHolder*,
|
||||
Function,+,view_holder_attach_to_gui,void,"ViewHolder*, Gui*"
|
||||
Function,+,view_holder_free,void,ViewHolder*
|
||||
Function,+,view_holder_get_free_context,void*,ViewHolder*
|
||||
Function,+,view_holder_send_to_back,void,ViewHolder*
|
||||
Function,+,view_holder_send_to_front,void,ViewHolder*
|
||||
Function,+,view_holder_set_back_callback,void,"ViewHolder*, BackCallback, void*"
|
||||
Function,+,view_holder_set_free_callback,void,"ViewHolder*, FreeCallback, void*"
|
||||
Function,+,view_holder_set_view,void,"ViewHolder*, View*"
|
||||
Function,+,view_holder_start,void,ViewHolder*
|
||||
Function,+,view_holder_stop,void,ViewHolder*
|
||||
Function,+,view_holder_update,void,"View*, void*"
|
||||
Function,+,view_port_alloc,ViewPort*,
|
||||
Function,+,view_port_draw_callback_set,void,"ViewPort*, ViewPortDrawCallback, void*"
|
||||
|
||||
|
@@ -22,7 +22,6 @@
|
||||
"signal_reader",
|
||||
"microtar",
|
||||
"usb_stm32",
|
||||
"appframe",
|
||||
"assets",
|
||||
"one_wire",
|
||||
"music_worker",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,71.0,,
|
||||
Version,+,72.0,,
|
||||
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
||||
@@ -1243,11 +1243,13 @@ Function,+,furi_event_flag_set,uint32_t,"FuriEventFlag*, uint32_t"
|
||||
Function,+,furi_event_flag_wait,uint32_t,"FuriEventFlag*, uint32_t, uint32_t, uint32_t"
|
||||
Function,+,furi_event_loop_alloc,FuriEventLoop*,
|
||||
Function,+,furi_event_loop_free,void,FuriEventLoop*
|
||||
Function,+,furi_event_loop_message_queue_subscribe,void,"FuriEventLoop*, FuriMessageQueue*, FuriEventLoopEvent, FuriEventLoopMessageQueueCallback, void*"
|
||||
Function,+,furi_event_loop_message_queue_unsubscribe,void,"FuriEventLoop*, FuriMessageQueue*"
|
||||
Function,+,furi_event_loop_pend_callback,void,"FuriEventLoop*, FuriEventLoopPendingCallback, void*"
|
||||
Function,+,furi_event_loop_run,void,FuriEventLoop*
|
||||
Function,+,furi_event_loop_stop,void,FuriEventLoop*
|
||||
Function,+,furi_event_loop_subscribe_message_queue,void,"FuriEventLoop*, FuriMessageQueue*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_subscribe_mutex,void,"FuriEventLoop*, FuriMutex*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_subscribe_semaphore,void,"FuriEventLoop*, FuriSemaphore*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_subscribe_stream_buffer,void,"FuriEventLoop*, FuriStreamBuffer*, FuriEventLoopEvent, FuriEventLoopEventCallback, void*"
|
||||
Function,+,furi_event_loop_tick_set,void,"FuriEventLoop*, uint32_t, FuriEventLoopTickCallback, void*"
|
||||
Function,+,furi_event_loop_timer_alloc,FuriEventLoopTimer*,"FuriEventLoop*, FuriEventLoopTimerCallback, FuriEventLoopTimerType, void*"
|
||||
Function,+,furi_event_loop_timer_free,void,FuriEventLoopTimer*
|
||||
@@ -1257,6 +1259,7 @@ Function,+,furi_event_loop_timer_is_running,_Bool,const FuriEventLoopTimer*
|
||||
Function,+,furi_event_loop_timer_restart,void,FuriEventLoopTimer*
|
||||
Function,+,furi_event_loop_timer_start,void,"FuriEventLoopTimer*, uint32_t"
|
||||
Function,+,furi_event_loop_timer_stop,void,FuriEventLoopTimer*
|
||||
Function,+,furi_event_loop_unsubscribe,void,"FuriEventLoop*, FuriEventLoopObject*"
|
||||
Function,+,furi_get_tick,uint32_t,
|
||||
Function,+,furi_hal_adc_acquire,FuriHalAdcHandle*,
|
||||
Function,+,furi_hal_adc_configure,void,FuriHalAdcHandle*
|
||||
@@ -1797,6 +1800,7 @@ Function,+,furi_semaphore_acquire,FuriStatus,"FuriSemaphore*, uint32_t"
|
||||
Function,+,furi_semaphore_alloc,FuriSemaphore*,"uint32_t, uint32_t"
|
||||
Function,+,furi_semaphore_free,void,FuriSemaphore*
|
||||
Function,+,furi_semaphore_get_count,uint32_t,FuriSemaphore*
|
||||
Function,+,furi_semaphore_get_space,uint32_t,FuriSemaphore*
|
||||
Function,+,furi_semaphore_release,FuriStatus,FuriSemaphore*
|
||||
Function,+,furi_stream_buffer_alloc,FuriStreamBuffer*,"size_t, size_t"
|
||||
Function,+,furi_stream_buffer_bytes_available,size_t,FuriStreamBuffer*
|
||||
@@ -2954,7 +2958,7 @@ Function,+,power_get_info,void,"Power*, PowerInfo*"
|
||||
Function,+,power_get_pubsub,FuriPubSub*,Power*
|
||||
Function,+,power_is_battery_healthy,_Bool,Power*
|
||||
Function,+,power_off,void,Power*
|
||||
Function,+,power_reboot,void,PowerBootMode
|
||||
Function,+,power_reboot,void,"Power*, PowerBootMode"
|
||||
Function,-,power_trigger_ui_update,void,Power*
|
||||
Function,+,powf,float,"float, float"
|
||||
Function,-,powl,long double,"long double, long double"
|
||||
@@ -3671,11 +3675,11 @@ Function,+,view_holder_alloc,ViewHolder*,
|
||||
Function,+,view_holder_attach_to_gui,void,"ViewHolder*, Gui*"
|
||||
Function,+,view_holder_free,void,ViewHolder*
|
||||
Function,+,view_holder_get_free_context,void*,ViewHolder*
|
||||
Function,+,view_holder_send_to_back,void,ViewHolder*
|
||||
Function,+,view_holder_send_to_front,void,ViewHolder*
|
||||
Function,+,view_holder_set_back_callback,void,"ViewHolder*, BackCallback, void*"
|
||||
Function,+,view_holder_set_free_callback,void,"ViewHolder*, FreeCallback, void*"
|
||||
Function,+,view_holder_set_view,void,"ViewHolder*, View*"
|
||||
Function,+,view_holder_start,void,ViewHolder*
|
||||
Function,+,view_holder_stop,void,ViewHolder*
|
||||
Function,+,view_holder_update,void,"View*, void*"
|
||||
Function,+,view_port_alloc,ViewPort*,
|
||||
Function,+,view_port_draw_callback_set,void,"ViewPort*, ViewPortDrawCallback, void*"
|
||||
|
||||
|
@@ -34,7 +34,6 @@
|
||||
"microtar",
|
||||
"usb_stm32",
|
||||
"infrared",
|
||||
"appframe",
|
||||
"assets",
|
||||
"one_wire",
|
||||
"ibutton",
|
||||
|
||||
Reference in New Issue
Block a user