@@ -339,7 +339,7 @@ static void wifi_module_render_callback(Canvas* const canvas, void* ctx)
339339 break ;
340340 case ScanAnimation :
341341 {
342- uint32_t currentTime = osKernelGetTickCount ();
342+ uint32_t currentTime = furi_get_tick ();
343343 if (currentTime - app -> m_prevAnimationTime > app -> m_animationTime )
344344 {
345345 app -> m_prevAnimationTime = currentTime ;
@@ -363,7 +363,7 @@ static void wifi_module_render_callback(Canvas* const canvas, void* ctx)
363363 break ;
364364 case MonitorAnimation :
365365 {
366- uint32_t currentTime = osKernelGetTickCount ();
366+ uint32_t currentTime = furi_get_tick ();
367367 if (currentTime - app -> m_prevAnimationTime > app -> m_animationTime )
368368 {
369369 app -> m_prevAnimationTime = currentTime ;
@@ -392,11 +392,11 @@ static void wifi_module_render_callback(Canvas* const canvas, void* ctx)
392392 release_mutex ((ValueMutex * )ctx , app );
393393}
394394
395- static void wifi_module_input_callback (InputEvent * input_event , osMessageQueueId_t event_queue ) {
395+ static void wifi_module_input_callback (InputEvent * input_event , FuriMessageQueue * event_queue ) {
396396 furi_assert (event_queue );
397397
398398 SPluginEvent event = {.m_type = EventTypeKey , .m_input = * input_event };
399- osMessageQueuePut (event_queue , & event , 0 , osWaitForever );
399+ furi_message_queue_put (event_queue , & event , FuriWaitForever );
400400}
401401
402402static void uart_on_irq_cb (UartIrqEvent ev , uint8_t data , void * context ) {
@@ -432,8 +432,8 @@ static int32_t uart_worker(void* context) {
432432
433433 while (true)
434434 {
435- uint32_t events = furi_thread_flags_wait (WorkerEventStop | WorkerEventRx , osFlagsWaitAny , osWaitForever );
436- furi_check ((events & osFlagsError ) == 0 );
435+ uint32_t events = furi_thread_flags_wait (WorkerEventStop | WorkerEventRx , FuriFlagWaitAny , FuriWaitForever );
436+ furi_check ((events & FuriFlagError ) == 0 );
437437
438438 if (events & WorkerEventStop ) break ;
439439 if (events & WorkerEventRx )
@@ -601,10 +601,10 @@ int32_t wifi_scanner_app(void* p)
601601
602602 WIFI_APP_LOG_I ("Init" );
603603
604- // osTimerId_t timer = osTimerNew (blink_test_update, osTimerPeriodic , event_queue, NULL );
605- // osTimerStart (timer, osKernelGetTickFreq ());
604+ // FuriTimer* timer = furi_timer_alloc (blink_test_update, FuriTimerTypePeriodic , event_queue);
605+ // furi_timer_start (timer, furi_kernel_get_tick_frequency ());
606606
607- osMessageQueueId_t event_queue = osMessageQueueNew (8 , sizeof (SPluginEvent ), NULL );
607+ FuriMessageQueue * event_queue = furi_message_queue_alloc (8 , sizeof (SPluginEvent ));
608608
609609 SWiFiScannerApp * app = malloc (sizeof (SWiFiScannerApp ));
610610
@@ -663,7 +663,7 @@ int32_t wifi_scanner_app(void* p)
663663 SPluginEvent event ;
664664 for (bool processing = true; processing ;)
665665 {
666- osStatus_t event_status = osMessageQueueGet (event_queue , & event , NULL , 100 );
666+ FuriStatus event_status = furi_message_queue_get (event_queue , & event , 100 );
667667 SWiFiScannerApp * app = (SWiFiScannerApp * )acquire_mutex_block (& app_data_mutex );
668668
669669#if ENABLE_MODULE_DETECTION
@@ -681,7 +681,7 @@ int32_t wifi_scanner_app(void* p)
681681 }
682682#endif // ENABLE_MODULE_DETECTION
683683
684- if (event_status == osOK )
684+ if (event_status == FuriStatusOk )
685685 {
686686 if (event .m_type == EventTypeKey )
687687 {
@@ -817,7 +817,7 @@ int32_t wifi_scanner_app(void* p)
817817
818818 view_port_free (view_port );
819819
820- osMessageQueueDelete (event_queue );
820+ furi_message_queue_free (event_queue );
821821
822822 vStreamBufferDelete (app -> m_rx_stream );
823823
@@ -833,4 +833,4 @@ int32_t wifi_scanner_app(void* p)
833833#endif
834834
835835 return 0 ;
836- }
836+ }
0 commit comments