From 173a422439e34afd91a37fb609a3f36fb75e1306 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 30 Apr 2017 12:55:14 -0700 Subject: [PATCH] basic support for non-avr, non-usb boards This is the smallest change to make Kaleidoscope compile for nRF52 BLE boards. https://github.com/wez/KaleidoscopeKeyboards has more code and build machinery for my proof of concept for using Kaleidoscope as the driver for a keyboard using the new nRF52 based board from Adafruit. --- src/Kaleidoscope.cpp | 2 ++ src/Kaleidoscope.h | 2 ++ src/key_events.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/Kaleidoscope.cpp b/src/Kaleidoscope.cpp index 2d171a62..ac35c64c 100644 --- a/src/Kaleidoscope.cpp +++ b/src/Kaleidoscope.cpp @@ -9,7 +9,9 @@ Kaleidoscope_::Kaleidoscope_(void) { void Kaleidoscope_::setup(void) { +#ifdef __AVR__ wdt_disable(); +#endif delay(100); Keyboard.begin(); KeyboardHardware.setup(); diff --git a/src/Kaleidoscope.h b/src/Kaleidoscope.h index 5ab8cfa0..4a1ecbec 100644 --- a/src/Kaleidoscope.h +++ b/src/Kaleidoscope.h @@ -18,7 +18,9 @@ void setup(); #include #include +#ifdef __AVR__ #include +#endif #include KALEIDOSCOPE_HARDWARE_H #include "key_events.h" diff --git a/src/key_events.h b/src/key_events.h index 09ddee74..16cf6d3e 100644 --- a/src/key_events.h +++ b/src/key_events.h @@ -1,6 +1,8 @@ #pragma once #include +#ifdef USBCON #include "KeyboardioHID.h" +#endif #include KALEIDOSCOPE_HARDWARE_H #include "key_defs.h"