Simple USB-MIDI foot controller
Dependencies: PinDetect USBDevice_STM32F103 mbed-STM32F103C8T6
Diff: main.cpp
- Revision:
- 5:1208f33a9a7c
- Parent:
- 4:91f901ade703
- Child:
- 6:2f804d29cbb0
diff -r 91f901ade703 -r 1208f33a9a7c main.cpp --- a/main.cpp Fri Aug 04 03:20:54 2017 +0200 +++ b/main.cpp Fri Aug 04 03:29:27 2017 +0200 @@ -39,8 +39,12 @@ serial = new Serial(PA_9, PA_10); serial->printf("Creating event queue...\r\n"); #endif - // create an event queue - EventQueue queue(8*EVENTS_EVENT_SIZE); + EventQueue queue; + +#ifndef NDEBUG + serial->printf("Creating USBMIDI device...\r\n"); +#endif + midi = new USBMIDI(0x1f00, 0x2012, 0x0001); #ifndef NDEBUG serial->printf("Initializing LED...\r\n"); @@ -52,7 +56,7 @@ serial->printf("Initializing event queue thread...\r\n"); #endif // create a thread that'll run the event queue's dispatch function - Thread usbThread(osPriorityLow); + Thread usbThread; #ifndef NDEBUG serial->printf("Starting event queue thread...\r\n"); #endif @@ -67,11 +71,6 @@ } #ifndef NDEBUG - serial->printf("Creating USBMIDI device...\r\n"); -#endif - midi = new USBMIDI(0x1f00, 0x2012, 0x0001); - -#ifndef NDEBUG serial->printf("Entering main loop...\r\n"); #endif while (true) {