diff --git a/src/Kaleidoscope-Model01-TestMode.h b/src/Kaleidoscope-Model01-TestMode.h
index 55ed92cb..4ffd687a 100644
--- a/src/Kaleidoscope-Model01-TestMode.h
+++ b/src/Kaleidoscope-Model01-TestMode.h
@@ -16,4 +16,8 @@
#pragma once
+#ifndef ARDUINO_AVR_MODEL01
+#error The Kaleidoscope-Model01-TestMode plugin was designed for the Keyboardio Model01, and does not work with any other hardware.
+#endif
+
#include "kaleidoscope/plugin/Model01-TestMode.h"
diff --git a/src/kaleidoscope/hardware/Model01.cpp b/src/kaleidoscope/hardware/Model01.cpp
index 7c9dc4c0..4fbd7433 100644
--- a/src/kaleidoscope/hardware/Model01.cpp
+++ b/src/kaleidoscope/hardware/Model01.cpp
@@ -15,6 +15,8 @@
* this program. If not, see .
*/
+#ifdef ARDUINO_AVR_MODEL01
+
#include
#include
#include
@@ -314,3 +316,5 @@ uint8_t Model01::pressedKeyswitchCount() {
}
HARDWARE_IMPLEMENTATION KeyboardHardware;
+
+#endif
diff --git a/src/kaleidoscope/hardware/Model01.h b/src/kaleidoscope/hardware/Model01.h
index 7cb9717a..52fd5ec8 100644
--- a/src/kaleidoscope/hardware/Model01.h
+++ b/src/kaleidoscope/hardware/Model01.h
@@ -17,6 +17,8 @@
#pragma once
+#ifdef ARDUINO_AVR_MODEL01
+
#include
#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::Model01
@@ -320,3 +322,5 @@ constexpr byte R3C15 = keyIndex(3, 15);
{r2c0, r2c1, r2c2, r2c3, r2c4, r2c5, r2c6, r2c7, r2c8, r2c9, r2c10, r2c11, r2c12, r2c13, r2c14, r2c15}, \
{r3c0, r3c1, r3c2, r3c3, r3c4, r3c5, r3c6, r3c7, r3c8, r3c9, r3c10, r3c11, r3c12, r3c13, r3c14, RESTRICT_ARGS_COUNT((r3c15), 64, KEYMAP, ##__VA_ARGS__)}, \
}
+
+#endif
diff --git a/src/kaleidoscope/plugin/Model01-TestMode.cpp b/src/kaleidoscope/plugin/Model01-TestMode.cpp
index b7bf3cce..c2776ec1 100644
--- a/src/kaleidoscope/plugin/Model01-TestMode.cpp
+++ b/src/kaleidoscope/plugin/Model01-TestMode.cpp
@@ -14,6 +14,8 @@
* this program. If not, see .
*/
+#if ARDUINO_AVR_MODEL01
+
#include "Kaleidoscope.h"
#include "Kaleidoscope-Model01-TestMode.h"
#include "Kaleidoscope-LEDEffect-Rainbow.h"
@@ -164,3 +166,5 @@ void TestMode::run_tests() {
}
kaleidoscope::plugin::TestMode TestMode;
+
+#endif
diff --git a/src/kaleidoscope/plugin/Model01-TestMode.h b/src/kaleidoscope/plugin/Model01-TestMode.h
index a3cbae0c..d1419469 100644
--- a/src/kaleidoscope/plugin/Model01-TestMode.h
+++ b/src/kaleidoscope/plugin/Model01-TestMode.h
@@ -16,9 +16,7 @@
#pragma once
-#ifndef ARDUINO_AVR_MODEL01
-#error The Kaleidoscope-Model01-TestMode plugin was designed for the Keyboardio Model01, and does not work with any other hardware.
-#endif
+#ifdef ARDUINO_AVR_MODEL01
#include
#include "Kaleidoscope.h"
@@ -51,3 +49,5 @@ class TestMode : public kaleidoscope::Plugin {
}
extern kaleidoscope::plugin::TestMode TestMode;
+
+#endif