diff --git a/src/Kaleidoscope-Hardware-EZ-ErgoDox.h b/src/Kaleidoscope-Hardware-EZ-ErgoDox.h index 356e315d..d769aba9 100644 --- a/src/Kaleidoscope-Hardware-EZ-ErgoDox.h +++ b/src/Kaleidoscope-Hardware-EZ-ErgoDox.h @@ -17,4 +17,4 @@ */ #pragma once -#include "kaleidoscope/hardware/ErgoDox.h" +#include "kaleidoscope/hardware/ez/ErgoDox.h" diff --git a/src/Kaleidoscope-Hardware-Model01.h b/src/Kaleidoscope-Hardware-Model01.h index 5671a34d..b2ef4ff6 100644 --- a/src/Kaleidoscope-Hardware-Model01.h +++ b/src/Kaleidoscope-Hardware-Model01.h @@ -17,4 +17,4 @@ #pragma once -#include "kaleidoscope/hardware/Model01.h" +#include "kaleidoscope/hardware/keyboardio/Model01.h" diff --git a/src/kaleidoscope/hardware/ErgoDox.cpp b/src/kaleidoscope/hardware/ez/ErgoDox.cpp similarity index 97% rename from src/kaleidoscope/hardware/ErgoDox.cpp rename to src/kaleidoscope/hardware/ez/ErgoDox.cpp index 706e3a61..5b183c3c 100644 --- a/src/kaleidoscope/hardware/ErgoDox.cpp +++ b/src/kaleidoscope/hardware/ez/ErgoDox.cpp @@ -29,10 +29,11 @@ #include #include #include -#include "kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h" +#include "kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.h" namespace kaleidoscope { namespace hardware { +namespace ez { ErgoDoxScanner ErgoDox::scanner_; uint8_t ErgoDox::previousKeyState_[ROWS]; @@ -245,10 +246,11 @@ uint8_t ErgoDox::pressedKeyswitchCount() { return count; } +} } } HARDWARE_IMPLEMENTATION KeyboardHardware; -kaleidoscope::hardware::ErgoDox &ErgoDox = KeyboardHardware; +kaleidoscope::hardware::ez::ErgoDox &ErgoDox = KeyboardHardware; #endif diff --git a/src/kaleidoscope/hardware/ErgoDox.h b/src/kaleidoscope/hardware/ez/ErgoDox.h similarity index 97% rename from src/kaleidoscope/hardware/ErgoDox.h rename to src/kaleidoscope/hardware/ez/ErgoDox.h index c4daac91..c7672ca7 100644 --- a/src/kaleidoscope/hardware/ErgoDox.h +++ b/src/kaleidoscope/hardware/ez/ErgoDox.h @@ -29,9 +29,9 @@ #include -#include "kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h" +#include "kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.h" -#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::ErgoDox +#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::ez::ErgoDox #include "Kaleidoscope-HIDAdaptor-KeyboardioHID.h" #include "kaleidoscope/macro_helpers.h" @@ -44,6 +44,7 @@ struct cRGB { namespace kaleidoscope { namespace hardware { +namespace ez { class ErgoDox { public: @@ -186,9 +187,10 @@ class ErgoDox { } } } +} #include "kaleidoscope/hardware/key_indexes.h" -extern kaleidoscope::hardware::ErgoDox &ErgoDox; +extern kaleidoscope::hardware::ez::ErgoDox &ErgoDox; #endif diff --git a/src/kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.cpp b/src/kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.cpp similarity index 97% rename from src/kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.cpp rename to src/kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.cpp index 8969e042..aed1c342 100644 --- a/src/kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.cpp +++ b/src/kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.cpp @@ -25,9 +25,9 @@ #ifdef ARDUINO_AVR_ERGODOX -#include "kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h" +#include "kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.h" #include -#include "kaleidoscope/hardware/ErgoDox/i2cmaster.h" +#include "kaleidoscope/hardware/ez/ErgoDox/i2cmaster.h" #define I2C_ADDR 0b0100000 #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) @@ -43,6 +43,7 @@ namespace kaleidoscope { namespace hardware { +namespace ez { uint8_t ErgoDoxScanner::initExpander() { uint8_t status = 0x20; @@ -200,6 +201,7 @@ ErgoDoxScanner::reattachExpanderOnError() { start_time = millis(); } +} } } diff --git a/src/kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h b/src/kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.h similarity index 98% rename from src/kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h rename to src/kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.h index a3c63f06..c7613e31 100644 --- a/src/kaleidoscope/hardware/ErgoDox/ErgoDoxScanner.h +++ b/src/kaleidoscope/hardware/ez/ErgoDox/ErgoDoxScanner.h @@ -31,6 +31,7 @@ namespace kaleidoscope { namespace hardware { +namespace ez { class ErgoDoxScanner { public: @@ -50,6 +51,7 @@ class ErgoDoxScanner { uint8_t initExpander(); }; +} } } diff --git a/src/kaleidoscope/hardware/ErgoDox/i2cmaster.cpp b/src/kaleidoscope/hardware/ez/ErgoDox/i2cmaster.cpp similarity index 99% rename from src/kaleidoscope/hardware/ErgoDox/i2cmaster.cpp rename to src/kaleidoscope/hardware/ez/ErgoDox/i2cmaster.cpp index 74018792..37ae1714 100644 --- a/src/kaleidoscope/hardware/ErgoDox/i2cmaster.cpp +++ b/src/kaleidoscope/hardware/ez/ErgoDox/i2cmaster.cpp @@ -12,7 +12,7 @@ #include #include -#include "kaleidoscope/hardware/ErgoDox/i2cmaster.h" +#include "kaleidoscope/hardware/ez/ErgoDox/i2cmaster.h" /* define CPU frequency in Mhz here if not defined in Makefile */ diff --git a/src/kaleidoscope/hardware/ErgoDox/i2cmaster.h b/src/kaleidoscope/hardware/ez/ErgoDox/i2cmaster.h similarity index 100% rename from src/kaleidoscope/hardware/ErgoDox/i2cmaster.h rename to src/kaleidoscope/hardware/ez/ErgoDox/i2cmaster.h diff --git a/src/kaleidoscope/hardware/Model01.cpp b/src/kaleidoscope/hardware/keyboardio/Model01.cpp similarity index 99% rename from src/kaleidoscope/hardware/Model01.cpp rename to src/kaleidoscope/hardware/keyboardio/Model01.cpp index 8fd342ff..f0f67980 100644 --- a/src/kaleidoscope/hardware/Model01.cpp +++ b/src/kaleidoscope/hardware/keyboardio/Model01.cpp @@ -23,6 +23,7 @@ namespace kaleidoscope { namespace hardware { +namespace keyboardio { KeyboardioScanner Model01::leftHand(0); KeyboardioScanner Model01::rightHand(3); @@ -316,6 +317,7 @@ uint8_t Model01::pressedKeyswitchCount() { return __builtin_popcountl(leftHandState.all) + __builtin_popcountl(rightHandState.all); } +} } } diff --git a/src/kaleidoscope/hardware/Model01.h b/src/kaleidoscope/hardware/keyboardio/Model01.h similarity index 98% rename from src/kaleidoscope/hardware/Model01.h rename to src/kaleidoscope/hardware/keyboardio/Model01.h index 11cddc33..c0fc0a6e 100644 --- a/src/kaleidoscope/hardware/Model01.h +++ b/src/kaleidoscope/hardware/keyboardio/Model01.h @@ -21,7 +21,7 @@ #include -#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::Model01 +#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::keyboardio::Model01 #include "Kaleidoscope-HIDAdaptor-KeyboardioHID.h" #include "KeyboardioScanner.h" @@ -31,6 +31,7 @@ namespace kaleidoscope { namespace hardware { +namespace keyboardio { class Model01 { public: @@ -134,6 +135,7 @@ class Model01 { static keydata_t rightHandMask; }; +} } }