Deprecate named hardware objects

Some boards used to provide the device object under an alias named after the
device itself. For the sake of consistency, we do not want to provide these
aliases in the future. As such, deprecate them, and update all users to use
`KeyboardHardware` instead.

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

@ -78,7 +78,7 @@ KALEIDOSCOPE_INIT_PLUGINS(Macros);
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
switch (macroIndex) {
case RESET:
KBD4x.resetDevice();
KeyboardHardware.resetDevice();
break;
default:
break;

@ -83,7 +83,7 @@ KALEIDOSCOPE_INIT_PLUGINS(Macros);
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
switch (macroIndex) {
case RESET:
Atreus.resetDevice();
KeyboardHardware.resetDevice();
break;
default:
break;

@ -156,6 +156,6 @@ class ErgoDox : public kaleidoscope::Hardware {
}
}
extern kaleidoscope::device::ez::ErgoDox &ErgoDox;
extern kaleidoscope::device::ez::ErgoDox DEPRECATED(NAMED_HARDWARE) &ErgoDox;
#endif

@ -67,6 +67,6 @@ class KBD4x: public kaleidoscope::device::ATMegaKeyboard {
}
}
extern kaleidoscope::device::kbdfans::KBD4x &KBD4x;
extern kaleidoscope::device::kbdfans::KBD4x DEPRECATED(NAMED_HARDWARE) &KBD4x;
#endif

@ -63,6 +63,6 @@ class Planck: public kaleidoscope::device::ATMegaKeyboard {
}
}
extern kaleidoscope::device::olkb::Planck &Planck;
extern kaleidoscope::device::olkb::Planck DEPRECATED(NAMED_HARDWARE) &Planck;
#endif

@ -88,6 +88,6 @@ class Splitography: public kaleidoscope::device::ATMegaKeyboard {
}
}
extern kaleidoscope::device::softhruf::Splitography &Splitography;
extern kaleidoscope::device::softhruf::Splitography DEPRECATED(NAMED_HARDWARE) &Splitography;
#endif

@ -105,6 +105,6 @@ class Atreus: public kaleidoscope::device::ATMegaKeyboard {
}
}
extern kaleidoscope::device::technomancy::Atreus &Atreus;
extern kaleidoscope::device::technomancy::Atreus DEPRECATED(NAMED_HARDWARE) &Atreus;
#endif

@ -82,6 +82,6 @@ class Atreus2: public kaleidoscope::device::ATMegaKeyboard {
}
}
extern kaleidoscope::device::technomancy::Atreus2 &Atreus2;
extern kaleidoscope::device::technomancy::Atreus2 DEPRECATED(NAMED_HARDWARE) &Atreus2;
#endif

@ -26,3 +26,7 @@
"------------------------------------------------------------------------\n" \
/* Messages */
#define _DEPRECATED_MESSAGE_NAMED_HARDWARE __NL__ \
"Named hardware objects are deprecated, please use `KeyboardHardware`\n" __NL__ \
"instead."

Loading…
Cancel
Save