]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/protocol/chibios/main.c
STM32 EEPROM Emulation (#3741)
[qmk_firmware.git] / tmk_core / protocol / chibios / main.c
index 47a7eb09abc1a19ea49bc8db0744b7910f20fc8b..568c1edb28772f576c0480743770a5dd0b30bea0 100644 (file)
 #ifdef VISUALIZER_ENABLE
 #include "visualizer/visualizer.h"
 #endif
+#ifdef MIDI_ENABLE
+#include "qmk_midi.h"
+#endif
+#ifdef STM32F303xC
+#include "eeprom_stm32.h"
+#endif
 #include "suspend.h"
 #include "wait.h"
 
@@ -65,6 +71,17 @@ host_driver_t chibios_driver = {
   send_consumer
 };
 
+#ifdef VIRTSER_ENABLE
+void virtser_task(void);
+#endif
+
+#ifdef RAW_HID_ENABLE
+void raw_hid_task(void);
+#endif
+
+#ifdef CONSOLE_ENABLE
+void console_task(void);
+#endif
 
 /* TESTING
  * Amber LED blinker thread, times are in milliseconds.
@@ -95,6 +112,10 @@ int main(void) {
   halInit();
   chSysInit();
 
+#ifdef STM32F303xC
+  EEPROM_init();
+#endif
+
   // TESTING
   // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
 
@@ -104,6 +125,10 @@ int main(void) {
   /* init printf */
   init_printf(NULL,sendchar_pf);
 
+#ifdef MIDI_ENABLE
+  setup_midi();
+#endif
+
 #ifdef SERIAL_LINK_ENABLE
   init_serial_link();
 #endif
@@ -182,5 +207,14 @@ int main(void) {
     }
 
     keyboard_task();
+#ifdef CONSOLE_ENABLE
+    console_task();
+#endif
+#ifdef VIRTSER_ENABLE
+    virtser_task();
+#endif
+#ifdef RAW_HID_ENABLE
+    raw_hid_task();
+#endif
   }
 }