From c01d5a45d8e1d75943d116e5745ac52abc93d483 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 15 Oct 2021 20:56:29 +0200 Subject: [PATCH] wip Signed-off-by: Gergely Nagy --- src/kaleidoscope/Runtime.cpp | 12 ++++++------ src/kaleidoscope/driver/hid/RCMComposite.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/kaleidoscope/Runtime.cpp b/src/kaleidoscope/Runtime.cpp index 3218a64a..6d78a708 100644 --- a/src/kaleidoscope/Runtime.cpp +++ b/src/kaleidoscope/Runtime.cpp @@ -30,6 +30,11 @@ Runtime_::Runtime_(void) { // ---------------------------------------------------------------------------- void Runtime_::setup(void) { + kaleidoscope::sketch_exploration::pluginsExploreSketch(); + kaleidoscope::Hooks::onSetup(); + + device().setup(); + // We are explicitly initializing the Serial port as early as possible to // (temporarily, hopefully) work around an issue on OSX. If we initialize // Serial too late, no matter what we do, we'll end up reading garbage from @@ -38,12 +43,7 @@ Runtime_::setup(void) { // // TODO(anyone): Figure out a way we can get rid of this, and fix the bug // properly. - device().serialPort().begin(9600); - - kaleidoscope::sketch_exploration::pluginsExploreSketch(); - kaleidoscope::Hooks::onSetup(); - - device().setup(); + //device().serialPort().begin(9600); // Clear the keyboard state array (all keys idle at start) live_keys.clear(); diff --git a/src/kaleidoscope/driver/hid/RCMComposite.h b/src/kaleidoscope/driver/hid/RCMComposite.h index ab5ded64..4653792a 100644 --- a/src/kaleidoscope/driver/hid/RCMComposite.h +++ b/src/kaleidoscope/driver/hid/RCMComposite.h @@ -46,8 +46,8 @@ template class RCMComposite: public Base<_Props> { public: void setup() { - //rcmcomposite::RCMHID.begin(rcmcomposite::CompositeSerial, HID_KEYBOARD_MOUSE); - rcmcomposite::RCMHID.begin(HID_KEYBOARD_MOUSE); + rcmcomposite::RCMHID.begin(rcmcomposite::CompositeSerial, HID_KEYBOARD); + while(!USBComposite); } };