Make the Model01-specific parts compile only for the Model01

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/367/head
Gergely Nagy 6 years ago
parent f291c56f3b
commit 071568cddb
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -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"

@ -15,6 +15,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef ARDUINO_AVR_MODEL01
#include <Kaleidoscope.h>
#include <KeyboardioHID.h>
#include <avr/wdt.h>
@ -314,3 +316,5 @@ uint8_t Model01::pressedKeyswitchCount() {
}
HARDWARE_IMPLEMENTATION KeyboardHardware;
#endif

@ -17,6 +17,8 @@
#pragma once
#ifdef ARDUINO_AVR_MODEL01
#include <Arduino.h>
#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

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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

@ -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 <Arduino.h>
#include "Kaleidoscope.h"
@ -51,3 +49,5 @@ class TestMode : public kaleidoscope::Plugin {
}
extern kaleidoscope::plugin::TestMode TestMode;
#endif

Loading…
Cancel
Save