Simplify how key indexes are declared

Instead of having to include `device/key_indexes.h` from every single hardware
plugin, include it from `Kaleidoscope.h` instead. This also allows us to get rid
of the redundant `KeyAddr` typedef, by including `kaleidoscope/KeyAddr.h` from
`key_indexes.h` instead.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/710/head
Gergely Nagy 5 years ago
parent b233867d9f
commit 838e93b0f7
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -37,6 +37,7 @@ void setup();
#include <stdint.h> #include <stdint.h>
#include KALEIDOSCOPE_HARDWARE_H #include KALEIDOSCOPE_HARDWARE_H
#include "kaleidoscope/device/key_indexes.h"
extern HARDWARE_IMPLEMENTATION KeyboardHardware; extern HARDWARE_IMPLEMENTATION KeyboardHardware;

@ -156,8 +156,6 @@ class ErgoDox : public kaleidoscope::Hardware {
} }
} }
#include "kaleidoscope/device/key_indexes.h"
extern kaleidoscope::device::ez::ErgoDox &ErgoDox; extern kaleidoscope::device::ez::ErgoDox &ErgoDox;
#endif #endif

@ -67,8 +67,6 @@ class KBD4x: public kaleidoscope::device::ATMegaKeyboard {
} }
} }
#include "kaleidoscope/device/key_indexes.h"
extern kaleidoscope::device::kbdfans::KBD4x &KBD4x; extern kaleidoscope::device::kbdfans::KBD4x &KBD4x;
#endif #endif

@ -17,7 +17,7 @@
#pragma once #pragma once
typedef HARDWARE_IMPLEMENTATION::KeyAddr KeyAddr; #include "kaleidoscope/KeyAddr.h"
/* 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

@ -125,8 +125,6 @@ class Model01 : public kaleidoscope::Hardware {
} }
} }
#include "kaleidoscope/device/key_indexes.h"
#define PER_KEY_DATA_STACKED(dflt, \ #define PER_KEY_DATA_STACKED(dflt, \
r0c0, r0c1, r0c2, r0c3, r0c4, r0c5, r0c6, \ r0c0, r0c1, r0c2, r0c3, r0c4, r0c5, r0c6, \
r1c0, r1c1, r1c2, r1c3, r1c4, r1c5, r1c6, \ r1c0, r1c1, r1c2, r1c3, r1c4, r1c5, r1c6, \

@ -63,8 +63,6 @@ class Planck: public kaleidoscope::device::ATMegaKeyboard {
} }
} }
#include "kaleidoscope/device/key_indexes.h"
extern kaleidoscope::device::olkb::Planck &Planck; extern kaleidoscope::device::olkb::Planck &Planck;
#endif #endif

@ -88,8 +88,6 @@ class Splitography: public kaleidoscope::device::ATMegaKeyboard {
} }
} }
#include "kaleidoscope/device/key_indexes.h"
extern kaleidoscope::device::softhruf::Splitography &Splitography; extern kaleidoscope::device::softhruf::Splitography &Splitography;
#endif #endif

@ -105,8 +105,6 @@ class Atreus: public kaleidoscope::device::ATMegaKeyboard {
} }
} }
#include "kaleidoscope/device/key_indexes.h"
extern kaleidoscope::device::technomancy::Atreus &Atreus; extern kaleidoscope::device::technomancy::Atreus &Atreus;
#endif #endif

@ -82,8 +82,6 @@ class Atreus2: public kaleidoscope::device::ATMegaKeyboard {
} }
} }
#include "kaleidoscope/device/key_indexes.h"
extern kaleidoscope::device::technomancy::Atreus2 &Atreus2; extern kaleidoscope::device::technomancy::Atreus2 &Atreus2;
#endif #endif

Loading…
Cancel
Save