]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
SPLIT - Remove NO_USB_STARTUP_CHECK requirement for usb detection (#7053)
authorJoel Challis <git@zvecr.com>
Thu, 17 Oct 2019 22:37:37 +0000 (23:37 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Oct 2019 22:37:37 +0000 (23:37 +0100)
* Avoid NO_USB_STARTUP_CHECK - Disable USB as checks seem to enable it somehow

* Update quantum/split_common/split_util.c

Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Also remove NO_USB_STARTUP_CHECK from vitamins_included/rev1

keyboards/handwired/splittest/teensy_2/config.h
keyboards/vitamins_included/rev1/config.h
quantum/split_common/split_util.c

index 2b5bcf8e9272cf32a699c11a71674b1e65196ba1..7c092db30710b3e649c1b9ece71d7fe6eab90312 100644 (file)
@@ -29,5 +29,3 @@
 
 // teensy has vbus detection issues - use usb detection instead
 #define SPLIT_USB_DETECT
-// required for teensy slave otherwise it "locks up" during startup
-#define NO_USB_STARTUP_CHECK
index a6f9c95fba1188955c444c3d134f0e39de42f9e4..c4881db01b314124b19454a6c6a22c52feb82ed9 100644 (file)
@@ -21,7 +21,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "config_common.h"
 
 #define SPLIT_USB_DETECT
-#define NO_USB_STARTUP_CHECK
 
 #define EE_HANDS
 #define SOFT_SERIAL_PIN D0
index 8983861bcce6ecdc87d7ffb5c7c245eb2653af70..5c548de059e8d53a2e36e6149a15134a39979e56 100644 (file)
@@ -32,6 +32,12 @@ bool waitForUsb(void) {
         }
         wait_ms(100);
     }
+
+#if defined(__AVR__)
+    // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
+    (USBCON &= ~(_BV(USBE) | _BV(OTGPADE)));
+#endif
+
     return false;
 }