for dissembly

Dependencies:   X_NUCLEO_CCA02M1 ST_Events-old mbed

Fork of HelloWorld_CCA02M1 by ST

Revision:
17:97dffa2e68f7
Parent:
12:203c08553f4d
--- a/main.cpp	Wed Jul 12 13:57:40 2017 +0000
+++ b/main.cpp	Fri Jul 14 16:37:55 2017 +0000
@@ -41,7 +41,6 @@
 
 /* mbed specific header files. */
 #include "mbed.h"
-#include "rtos.h"
 
 
 #if DEVICE_I2S
@@ -63,9 +62,6 @@
     2       /* Default number of channels. */
 };
 
-/* Thread to manage I2S peripherals. */
-static rtos::Thread i2s_bh_daemon;
-
 
 /* Functions -----------------------------------------------------------------*/
 
@@ -86,10 +82,6 @@
         exit(EXIT_FAILURE);
     }
 
-    /* Starting a thread to manage I2S peripherals. */
-    Callback<void()> i2s_bh_task(&I2S::i2s_bh_queue, &events::EventQueue::dispatch_forever);
-    i2s_bh_daemon.start(i2s_bh_task);
-
     /* Enabling transmission via USB. */
     microphones->enable_usb();
 
@@ -102,6 +94,9 @@
     /* Printing to the console. */
     printf("--> Recording...\r\n");
     microphones->record();
+
+    /* Dispatching forever the I2S queue. */
+    I2S::i2s_bh_queue.dispatch_forever();
 }
 
 #else // DEVICE_I2S