Enabled virtual build for ez/ErgoDox

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
pull/650/head
Florian Fleissner 5 years ago
parent b5c9794626
commit 57e7fe59b1

@ -24,6 +24,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#ifdef ARDUINO_AVR_ERGODOX
#include <Kaleidoscope.h>
@ -232,3 +233,4 @@ uint8_t ErgoDox::pressedKeyswitchCount() {
kaleidoscope::device::ez::ErgoDox &ErgoDox = kaleidoscope_internal::device;
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -29,8 +29,6 @@
#include <Arduino.h>
#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<ErgoDoxProps> {
public:
ErgoDox(void) {}
@ -93,6 +95,9 @@ class ErgoDox : public kaleidoscope::device::ATmega32U4Keyboard<ErgoDoxProps> {
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 */ \

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

@ -7,6 +7,7 @@
* Usage: API compatible with I2C Software Library i2cmaster.h
**************************************************************************/
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#ifdef ARDUINO_AVR_ERGODOX
#include <inttypes.h>
@ -201,3 +202,4 @@ unsigned char i2c_readNak(void) {
}/* i2c_readNak */
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -17,7 +17,9 @@
#pragma once
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include <avr/wdt.h>
#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
}
}

@ -15,6 +15,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include <Kaleidoscope.h>
#ifdef KALEIDOSCOPE_BOOTLOADER_FLIP_WORKAROUND
@ -74,3 +75,4 @@ void FLIP::rebootBootloader() {
}
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -17,11 +17,13 @@
#pragma once
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include <avr/wdt.h>
#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
}
}

@ -17,7 +17,9 @@
#pragma once
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include <avr/wdt.h>
#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
}
}

Loading…
Cancel
Save