renovate/configure
main
master
f/handleHelp-varargs
wip/refactor-focus
f/clang-format-14
hardware/ploopy
examples/factory-firmware
f/driver/keyboardiohid
tmp/zagdul
jesse/space-cadet
jesse/wip/gd32-win
macros/rearchitecture
wip/rcm-stm32
f/keyboardio-model-100
charshift/configuration
pointing-device
f/samd-testbed
f/automatic-build-nightly
f/driver/keyboardiohid-orig
f/keymap-cache-redesign
tmp/parallel-cli
tmp/arduino-cli-pre-rebase
pr_host_keymap
f/testing-event-queue
testing
epan/testing/main
epan/testing/issue-840
epan/testing/readable
epan/build/justlib
epan/build/cmake
epan/testing/hello-simulator
device/normcore
atreus2/example-layout
v1.99.6
keyboardio-m100-MP-1
keyboardio-m100-DVT-3
keyboardio-m100-DVT-2
v1.99.5
v1.99.4
v1.99.3
v1.99.2
v1.99.1
v1.99.0
v1.98.0
v1.97.0
v1.94.0
v1.93.0
v1.92.0
v1.91.0
driver/bootloader-pre-rebase
shipped-model00-xmas
work-tip
${ noResults }
1 Commits (bab32fcc9d3ea8b409f2f98f99efae3c6409e097)
Author | SHA1 | Message | Date |
---|---|---|---|
Gergely Nagy |
0c8f998b9f
|
Redesign how the hardware objects are defined
Instead of having to define `HARDWARE_IMPLEMENTATION` to the class name of the device, and define `KeyboardHardware` from within the plugin, let all devices set `kaleidoscope::Device` to their own class via a typedef. Furthermore, instead of `KeyboardHardware`, use `Kaleidoscope.device()` instead. This makes device plugins a little bit simpler, and our naming more consistent. Because some parts of the firmware need to access the device object before the `Kaleidoscope` object is available, we can't make it a member of that. For this reason, the device object is `kaleidoscope_internal::device`, and `Kaleidoscope.device()` wraps it. In general, the wrapper should be used. But if access to the device is required before `Kaleidoscope` is available, then that's also available. The `Kaleidoscope` object grew a few more wrappers: `storage()` and `serialPort()`, so that one doesn't need to use `Kaleidoscope.device()` directly, but can use the wrappers, which are noticably shorter to write. Signed-off-by: Gergely Nagy <algernon@keyboard.io> |
5 years ago |