hardware::ErgoDox: Only compile the plugin when building for ErgoDox

With moving to a monorepo, the plugin will always be compiled, so we want to
guard ourselves, to only compile when building for the ErgoDox. We do this with
an `#ifdef ARDUINO_AVR_ERGODOX` guard.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/427/head^2
Gergely Nagy 6 years ago
parent 86dd55d87f
commit 1e02f4c8b4
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -24,6 +24,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef ARDUINO_AVR_ERGODOX
#include <Kaleidoscope.h>
#include <KeyboardioHID.h>
#include <avr/wdt.h>
@ -248,3 +250,5 @@ uint8_t ErgoDox::pressedKeyswitchCount() {
HARDWARE_IMPLEMENTATION KeyboardHardware;
kaleidoscope::hardware::ErgoDox &ErgoDox = KeyboardHardware;
#endif

@ -25,6 +25,8 @@
#pragma once
#ifdef ARDUINO_AVR_ERGODOX
#include <Arduino.h>
#include "kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h"
@ -285,3 +287,5 @@ constexpr byte R5C12 = keyIndex(5, 12);
constexpr byte R5C13 = keyIndex(5, 13);
extern kaleidoscope::hardware::ErgoDox &ErgoDox;
#endif

@ -23,6 +23,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef ARDUINO_AVR_ERGODOX
#include "kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h"
#include <avr/wdt.h>
#include "kaleidoscope/hardware/ErgoDox/i2cmaster.h"
@ -200,3 +202,5 @@ ErgoDoxScanner::reattachExpanderOnError() {
}
}
#endif

@ -25,6 +25,8 @@
#pragma once
#ifdef ARDUINO_AVR_ERGODOX
#include <Arduino.h>
namespace kaleidoscope {
@ -50,3 +52,5 @@ class ErgoDoxScanner {
}
}
#endif

@ -6,6 +6,9 @@
* Target: any AVR device with hardware TWI
* Usage: API compatible with I2C Software Library i2cmaster.h
**************************************************************************/
#ifdef ARDUINO_AVR_ERGODOX
#include <inttypes.h>
#include <compat/twi.h>
@ -196,3 +199,5 @@ unsigned char i2c_readNak(void) {
return TWDR;
}/* i2c_readNak */
#endif

@ -9,6 +9,8 @@
* Usage: see Doxygen manual
**************************************************************************/
#ifdef ARDUINO_AVR_ERGODOX
#ifdef DOXYGEN
/**
@defgroup pfleury_ic2master I2C Master library
@ -174,3 +176,5 @@ extern unsigned char i2c_read(unsigned char ack);
/**@}*/
#endif

Loading…
Cancel
Save