MX hai 1 ano
pai
achega
75cc2baec6
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 4 2
      bt_trigger.c
  2. 1 1
      bt_trigger.h

+ 4 - 2
bt_trigger.c

@@ -201,9 +201,11 @@ static void input_callback(InputEvent* input_event, void* ctx) {
 }
 
 //Timer callback
-static void timer_callback(FuriMessageQueue* event_queue) {
+static void timer_callback(void* ctx) {
     //check eventqueue is not null
-    furi_assert(event_queue);
+    furi_assert(ctx);
+    //Getting our event queue
+    FuriMessageQueue* event_queue = ctx;
     //creating event and adding it to the event list
     IosTriggerEvent event = {.type = EventTypeTick};
     furi_message_queue_put(event_queue, &event, 0);

+ 1 - 1
bt_trigger.h

@@ -47,7 +47,7 @@ typedef struct {
 
 static void draw_callback(Canvas* canvas, void* ctx);
 static void input_callback(InputEvent* input_event, void* ctx);
-static void timer_callback(FuriMessageQueue* event_queue);
+static void timer_callback(void* ctx);
 static void bt_hid_connection_status_changed_callback(BtStatus status, void* context);
 AppStruct* appStructAlloc();
 void cleanUpBeforeYouLeave(AppStruct* app);