diff --git a/src/kaleidoscope/Hardware.h b/src/kaleidoscope/Hardware.h index 7d846954..8f231c47 100644 --- a/src/kaleidoscope/Hardware.h +++ b/src/kaleidoscope/Hardware.h @@ -21,6 +21,8 @@ #pragma once +#ifdef __AVR__ + #include "kaleidoscope/MatrixAddr.h" #include "kaleidoscope_internal/deprecations.h" @@ -402,3 +404,5 @@ class Hardware { /** @} */ }; } + +#endif diff --git a/src/kaleidoscope/device/keyboardio/twi.c b/src/kaleidoscope/device/keyboardio/twi.c index f1c8eb65..38fe7e59 100644 --- a/src/kaleidoscope/device/keyboardio/twi.c +++ b/src/kaleidoscope/device/keyboardio/twi.c @@ -18,6 +18,8 @@ Modified 2012 by Todd Krein (todd@krein.org) to implement repeated starts */ +#ifdef __AVR__ + #define ENABLE_TWI_SLAVE_MODE 0 #include @@ -559,3 +561,5 @@ ISR(TWI_vect) { break; } } + +#endif diff --git a/src/kaleidoscope/device/keyboardio/twi.h b/src/kaleidoscope/device/keyboardio/twi.h index 29cdf16b..e3753519 100644 --- a/src/kaleidoscope/device/keyboardio/twi.h +++ b/src/kaleidoscope/device/keyboardio/twi.h @@ -16,6 +16,8 @@ with this program. If not, see . */ +#ifdef __AVR__ + #ifndef twi_h #define twi_h @@ -51,3 +53,4 @@ void twi_stop(void); void twi_releaseBus(void); #endif +#endif diff --git a/src/kaleidoscope/driver/bootloader/None.h b/src/kaleidoscope/driver/bootloader/None.h index d91fe105..a240ae0a 100644 --- a/src/kaleidoscope/driver/bootloader/None.h +++ b/src/kaleidoscope/driver/bootloader/None.h @@ -17,7 +17,6 @@ #pragma once -#include #include "kaleidoscope/driver/bootloader/Base.h" namespace kaleidoscope { diff --git a/src/kaleidoscope/driver/storage/AVREEPROM.h b/src/kaleidoscope/driver/storage/AVREEPROM.h index 6a39f2b3..9871a084 100644 --- a/src/kaleidoscope/driver/storage/AVREEPROM.h +++ b/src/kaleidoscope/driver/storage/AVREEPROM.h @@ -17,6 +17,8 @@ #pragma once +#ifdef __AVR__ + #include "kaleidoscope/driver/storage/Base.h" #include @@ -57,3 +59,5 @@ class AVREEPROM : public kaleidoscope::driver::storage::Base<_StorageProps> { } } } + +#endif diff --git a/src/kaleidoscope/plugin/FirmwareDump.cpp b/src/kaleidoscope/plugin/FirmwareDump.cpp index fc2450a0..04a40f7f 100644 --- a/src/kaleidoscope/plugin/FirmwareDump.cpp +++ b/src/kaleidoscope/plugin/FirmwareDump.cpp @@ -15,6 +15,7 @@ * this program. If not, see . */ +#ifdef __AVR__ #ifndef KALEIDOSCOPE_VIRTUAL_BUILD #include @@ -72,3 +73,4 @@ EventHandlerResult FirmwareDump::onFocusEvent(const char *command) { kaleidoscope::plugin::FirmwareDump FirmwareDump; #endif +#endif diff --git a/src/kaleidoscope/plugin/FirmwareDump.h b/src/kaleidoscope/plugin/FirmwareDump.h index 2f841174..aa3a41a4 100644 --- a/src/kaleidoscope/plugin/FirmwareDump.h +++ b/src/kaleidoscope/plugin/FirmwareDump.h @@ -21,6 +21,8 @@ #error "Firmware Dump is not available for virtual builds" #else +#ifdef __AVR__ + #include namespace kaleidoscope { @@ -42,3 +44,4 @@ class FirmwareDump : public kaleidoscope::Plugin { extern kaleidoscope::plugin::FirmwareDump FirmwareDump; #endif +#endif