diff --git a/src/kaleidoscope/device/ez/ErgoDox.cpp b/src/kaleidoscope/device/ez/ErgoDox.cpp
index 1d6c528c..38dd0f1b 100644
--- a/src/kaleidoscope/device/ez/ErgoDox.cpp
+++ b/src/kaleidoscope/device/ez/ErgoDox.cpp
@@ -24,6 +24,7 @@
* along with this program. If not, see .
*/
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#ifdef ARDUINO_AVR_ERGODOX
#include
@@ -232,3 +233,4 @@ uint8_t ErgoDox::pressedKeyswitchCount() {
kaleidoscope::device::ez::ErgoDox &ErgoDox = kaleidoscope_internal::device;
#endif
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
diff --git a/src/kaleidoscope/device/ez/ErgoDox.h b/src/kaleidoscope/device/ez/ErgoDox.h
index d7b35626..c706b27f 100644
--- a/src/kaleidoscope/device/ez/ErgoDox.h
+++ b/src/kaleidoscope/device/ez/ErgoDox.h
@@ -29,8 +29,6 @@
#include
-#include "kaleidoscope/device/ez/ErgoDox/ErgoDoxScanner.h"
-
#include "Kaleidoscope-HIDAdaptor-KeyboardioHID.h"
struct cRGB {
@@ -42,6 +40,9 @@ struct cRGB {
#include "kaleidoscope/driver/keyscanner/Base.h"
#include "kaleidoscope/driver/bootloader/avr/HalfKay.h"
#include "kaleidoscope/device/ATmega32U4Keyboard.h"
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
+#include "kaleidoscope/device/ez/ErgoDox/ErgoDoxScanner.h"
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
namespace kaleidoscope {
namespace device {
@@ -54,6 +55,7 @@ struct ErgoDoxProps : public kaleidoscope::device::ATmega32U4KeyboardProps {
typedef kaleidoscope::driver::bootloader::avr::HalfKay Bootloader;
};
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
class ErgoDox : public kaleidoscope::device::ATmega32U4Keyboard {
public:
ErgoDox(void) {}
@@ -93,6 +95,9 @@ class ErgoDox : public kaleidoscope::device::ATmega32U4Keyboard {
static void debounceRow(uint8_t change, uint8_t row);
static void readMatrixRow(uint8_t row);
};
+#else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
+class ErgoDox;
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#define PER_KEY_DATA_STACKED(dflt, \
/* left hand, spatial positions */ \
diff --git a/src/kaleidoscope/device/ez/ErgoDox/ErgoDoxScanner.cpp b/src/kaleidoscope/device/ez/ErgoDox/ErgoDoxScanner.cpp
index 660171c5..649710e5 100644
--- a/src/kaleidoscope/device/ez/ErgoDox/ErgoDoxScanner.cpp
+++ b/src/kaleidoscope/device/ez/ErgoDox/ErgoDoxScanner.cpp
@@ -23,6 +23,7 @@
* along with this program. If not, see .
*/
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#ifdef ARDUINO_AVR_ERGODOX
#include "kaleidoscope/device/ez/ErgoDox/ErgoDoxScanner.h"
@@ -171,3 +172,4 @@ ErgoDoxScanner::reattachExpanderOnError() {
}
#endif
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
diff --git a/src/kaleidoscope/device/ez/ErgoDox/i2cmaster.cpp b/src/kaleidoscope/device/ez/ErgoDox/i2cmaster.cpp
index 71400b84..abc105c1 100644
--- a/src/kaleidoscope/device/ez/ErgoDox/i2cmaster.cpp
+++ b/src/kaleidoscope/device/ez/ErgoDox/i2cmaster.cpp
@@ -7,6 +7,7 @@
* Usage: API compatible with I2C Software Library i2cmaster.h
**************************************************************************/
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#ifdef ARDUINO_AVR_ERGODOX
#include
@@ -201,3 +202,4 @@ unsigned char i2c_readNak(void) {
}/* i2c_readNak */
#endif
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
diff --git a/src/kaleidoscope/driver/bootloader/avr/Caterina.h b/src/kaleidoscope/driver/bootloader/avr/Caterina.h
index 7006c512..1d45939c 100644
--- a/src/kaleidoscope/driver/bootloader/avr/Caterina.h
+++ b/src/kaleidoscope/driver/bootloader/avr/Caterina.h
@@ -17,7 +17,9 @@
#pragma once
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/driver/bootloader/Base.h"
namespace kaleidoscope {
@@ -25,6 +27,7 @@ namespace driver {
namespace bootloader {
namespace avr {
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
class Caterina : public kaleidoscope::driver::bootloader::Base {
public:
static void rebootBootloader() {
@@ -49,6 +52,9 @@ class Caterina : public kaleidoscope::driver::bootloader::Base {
// happens before the watchdog reboots us
}
};
+#else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
+class Caterina;
+#endif // #ifndef KALEIDOSCOPE_VIRTUAL_BUILD
}
}
diff --git a/src/kaleidoscope/driver/bootloader/avr/FLIP.cpp b/src/kaleidoscope/driver/bootloader/avr/FLIP.cpp
index 4ab4485f..fcb86068 100644
--- a/src/kaleidoscope/driver/bootloader/avr/FLIP.cpp
+++ b/src/kaleidoscope/driver/bootloader/avr/FLIP.cpp
@@ -15,6 +15,7 @@
* this program. If not, see .
*/
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include
#ifdef KALEIDOSCOPE_BOOTLOADER_FLIP_WORKAROUND
@@ -74,3 +75,4 @@ void FLIP::rebootBootloader() {
}
#endif
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
diff --git a/src/kaleidoscope/driver/bootloader/avr/FLIP.h b/src/kaleidoscope/driver/bootloader/avr/FLIP.h
index bc79d59f..29af58c1 100644
--- a/src/kaleidoscope/driver/bootloader/avr/FLIP.h
+++ b/src/kaleidoscope/driver/bootloader/avr/FLIP.h
@@ -17,11 +17,13 @@
#pragma once
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include
#ifndef KALEIDOSCOPE_BOOTLOADER_FLIP_WORKAROUND
#error To use the FLIP bootloader driver, KALEIDOSCOPE_BOOTLOADER_FLIP_WORKAROUND *must* be defined prior to including this header!
#endif
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/driver/bootloader/Base.h"
@@ -30,10 +32,14 @@ namespace driver {
namespace bootloader {
namespace avr {
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
class FLIP : public kaleidoscope::driver::bootloader::Base {
public:
static void rebootBootloader();
};
+#else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
+class FLIP;
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
}
}
diff --git a/src/kaleidoscope/driver/bootloader/avr/HalfKay.h b/src/kaleidoscope/driver/bootloader/avr/HalfKay.h
index 651db242..7386122f 100644
--- a/src/kaleidoscope/driver/bootloader/avr/HalfKay.h
+++ b/src/kaleidoscope/driver/bootloader/avr/HalfKay.h
@@ -17,7 +17,9 @@
#pragma once
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include "kaleidoscope/driver/bootloader/Base.h"
namespace kaleidoscope {
@@ -25,6 +27,7 @@ namespace driver {
namespace bootloader {
namespace avr {
+#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
class HalfKay : public kaleidoscope::driver::bootloader::Base {
public:
// To reset a Teensy with the HalfKay bootloader, we need to disable all
@@ -65,6 +68,9 @@ class HalfKay : public kaleidoscope::driver::bootloader::Base {
asm volatile("jmp 0x7E00");
}
};
+#else
+class HalfKay;
+#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
}
}