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 #pragma once
#include "kaleidoscope/hardware/Atreus.h" #include "kaleidoscope/hardware/technomancy/Atreus.h"

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

@ -27,7 +27,7 @@
#ifdef ARDUINO_AVR_ATREUS #ifdef ARDUINO_AVR_ATREUS
#include <Arduino.h> #include <Arduino.h>
#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::Atreus #define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::technomancy::Atreus
#include "Kaleidoscope-HIDAdaptor-KeyboardioHID.h" #include "Kaleidoscope-HIDAdaptor-KeyboardioHID.h"
#include "kaleidoscope/macro_helpers.h" #include "kaleidoscope/macro_helpers.h"
@ -36,6 +36,7 @@
namespace kaleidoscope { namespace kaleidoscope {
namespace hardware { namespace hardware {
namespace technomancy {
class Atreus: public kaleidoscope::hardware::ATMegaKeyboard { class Atreus: public kaleidoscope::hardware::ATMegaKeyboard {
public: public:
Atreus(void) {} 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 /* 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 * 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. * user-facing code.
*/ */
constexpr byte keyIndex(byte row, byte col) { 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" #include "kaleidoscope/hardware/key_indexes.h"
extern kaleidoscope::hardware::Atreus &Atreus; extern kaleidoscope::hardware::technomancy::Atreus &Atreus;
#endif #endif
Loading…
Cancel
Save