Move the Atreus implementation into a vendor directory

Signed-off-by: Jesse Vincent <jesse@keyboard.io>
pull/461/head
Jesse Vincent 6 years ago committed by Gergely Nagy
parent 0fdd2b0dfc
commit 62b164bb1f

@ -17,4 +17,4 @@
*/
#pragma once
#include "kaleidoscope/hardware/Atreus.h"
#include "kaleidoscope/hardware/technomancy/Atreus.h"

@ -32,6 +32,7 @@
namespace kaleidoscope {
namespace hardware {
namespace technomancy {
const int8_t Atreus::matrix_rows;
const int8_t Atreus::matrix_columns;
@ -82,10 +83,11 @@ void Atreus::resetDevice() {
asm volatile("jmp 0x7E00");
}
}
}
}
HARDWARE_IMPLEMENTATION KeyboardHardware;
kaleidoscope::hardware::Atreus &Atreus = KeyboardHardware;
kaleidoscope::hardware::technomancy::Atreus &Atreus = KeyboardHardware;
#endif

@ -27,7 +27,7 @@
#ifdef ARDUINO_AVR_ATREUS
#include <Arduino.h>
#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::Atreus
#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::technomancy::Atreus
#include "Kaleidoscope-HIDAdaptor-KeyboardioHID.h"
#include "kaleidoscope/macro_helpers.h"
@ -36,6 +36,7 @@
namespace kaleidoscope {
namespace hardware {
namespace technomancy {
class Atreus: public kaleidoscope::hardware::ATMegaKeyboard {
public:
Atreus(void) {}
@ -82,6 +83,7 @@ class Atreus: public kaleidoscope::hardware::ATMegaKeyboard {
}
}
}
}
/* To be used by the hardware implementations, `keyIndex` tells us the index of
* a key, from which we can figure out the row and column as needed. The index
@ -92,11 +94,11 @@ class Atreus: public kaleidoscope::hardware::ATMegaKeyboard {
* user-facing code.
*/
constexpr byte keyIndex(byte row, byte col) {
return row * kaleidoscope::hardware::Atreus::matrix_columns + col + 1;
return row * kaleidoscope::hardware::technomancy::Atreus::matrix_columns + col + 1;
}
#include "kaleidoscope/hardware/key_indexes.h"
extern kaleidoscope::hardware::Atreus &Atreus;
extern kaleidoscope::hardware::technomancy::Atreus &Atreus;
#endif
Loading…
Cancel
Save