Gergely Nagy
d668dce127
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
0f32840a3a
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
962d959a7f
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
6b1745f339
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
71a956e3f2
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
94b7d13990
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
6602b30d0a
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
ee78ff88a7
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
191ecdb000
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
noseglasses
8130dfdf1d
Major redesign of the plugin and hooking interface
...
With this redesign, we introduce a new way to create plugins, which is easier to
extend with new hook points, provides a better interface, uses less memory, less
program space, and is a tiny bit faster too.
It all begins with `kaleidoscope::Plugin` being the base class, which provides
the hook methods plugins can implement. Plugins should be declared with
`KALEIDOSCOPE_INIT_PLUGINS` instead of `Kaleidoscope.use()`. Behind this macro
is a bit of magic (see the in-code documentation) that allows us to unroll the
hook method calls, avoid vtables, and so on. It creates an override for
`kaleidoscope::Hooks::*` methods, each of which will call the respective methods
of each initialized plugin.
With the new API come new names: all of the methods plugins can implement
received new, more descriptive names that all follow a similar pattern.
The old (dubbed V1) API still remains in place, although deprecated. One can
turn it off by setting the `KALEIDOSCOPE_ENABLE_V1_PLUGIN_API` define to zero,
while compiling the firmware.
This work is based on #276 , written by @noseglasses. @obra and @algernon did
some cleaning up and applied a little naming treatment.
Signed-off-by: noseglasses <shinynoseglasses@gmail.com>
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
bc76032d37
Add a very basic, no-frills, no-plugins example
...
This can be used to see the effect of changes on the core firmware alone,
without any plugins or the like.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
5399bda445
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
7044060ebf
Updated the README and the example to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
435018eb6a
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
8e4bfac703
Updated to use the new plugin APIs
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
93880767fb
Drop the HIDAdaptor includes
...
We are moving towards including the Adaptor from the Hardware library, so we
need not pull them in from user sketches (or from core).
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
1f195636e7
Include the HIDAdaptor library in the examples
...
At some point, we want to remove the default include, so start including the
extra library in the examples.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
c56c7791ba
Do not provide toggleLEDs
...
As this is a generic plugin, for keyboards that do not have LEDs, don't tie it
to LEDControl, and don't provide a `toggleLEDs` method. Instead, show an example
how to achieve the same thing from the sketch.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
810a69cf33
Rename the library to HostPowerManagement
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
539aa85d6a
Add a special `WakeupKeyboard`, to be able to wake the host up
...
At least on Linux, for a device to be considered capable of waking the host up,
it must be a boot keyboard. As we do not (yet) support a boot keyboard, we fake
one. An USB node that does nothing else than report itself as a boot keyboard,
and does the minimum amount of work to get recognised as such.
Because of this, Linux - and hopefully the other OSes too - will consider the
whole device capable of waking up the host.
This addresses keyboardio/Kaleidoscope#237 , if all goes well.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Gergely Nagy
24d06c7168
Initial import
...
Fixes keyboardio/Kaleidoscope#217 .
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7 years ago
Michael Richters
195d6bc413
Better compliance with coding style guide
...
* s/LayerCount/layer_count/
* s/CREATE_KEYMAP/KEYMAPS/
7 years ago
Michael Richters
de39e20d78
Define keymap layers with CREATE_KEYMAP macro
...
This macro allows the definition of the LayerCount variable and the
keymaps[] array together. It shouldn't break old sketches, but this is
probably not all that's necessary; LayerCount still doesn't get
initialized outside the macro.
7 years ago
Michael Richters
50ac31d0f5
Added a "sketch-trailer.h" header file
...
This file is meant to be included in sketch files in order to make
data available to Kaleidoscope functions. In particular, the size of
the keymaps[] array (i.e. the number of defined layers), which is
needed in order to prevent reading uninitialized memory past the end
of that array due to Key_KeymapNext_Momentary.
7 years ago
Michael Richters
7ddc0249bb
Added `LayerCount` variable to the example sketches
...
This took some trial and error to figure out, but once I determined
that the example sketches were being built, I made this change to keep
the build working. Hopefully this will satisfy Travis-CI.
7 years ago
Simon Lydell
4d6e1a770d
Make the example more complete
7 years ago
Gergely Nagy
51b28577db
Show an example of how to override defaults
...
Fixes #8 .
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Jesse Vincent
a4dfe289b3
Update the example to match the new numlock api
7 years ago
Gergely Nagy
219f28ba99
Initial import
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
acbb9a8e26
examples/AppSwitcher: Use Kaleidoscope.use instead of USE_PLUGINS
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
f1cb65b6d8
Stop using USE_PLUGINS
...
`USE_PLUGINS` is getting deprecated, use `Kaleidoscope.use` instead.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
0c9ff2f22b
Stop using deprecated interfaces
...
Use `Kaleidoscope.use` and `Kaleidoscope.useEventHandlerHook` instead of the
deprecated `USE_PLUGINS` and `event_handler_hook_use` interfaces.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
532b1129de
Stop using deprecated interfaces
...
As `USE_PLUGINS` and `loop_hook_use` are getting deprecated, use the newer APIs:
`Kaleidoscope.use` and `Kaleidoscope.useLoopHook`.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
df4a6f58cf
Stop using deprecated interfaces
...
Use `Kaleidoscope.use` instead of `USE_PLUGINS`, which is getting deprecated.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
b0c5876100
Stop using USE_PLUGINS
...
Use `Kaleidoscope.use` instead, because `USE_PLUGINS` is getting deprecated.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
d77f6f8de0
Stop using obsolete interfaces
...
`USE_PLUGINS` and `loop_hook_use` are deprecated, use `Kaleidoscope.use` and
`Kaleidoscope.useLoopHook` instead.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
c7bc3ad04c
Stop using USE_PLUGINS
...
The `USE_PLUGINS` macro is getting obsoleted, use `Kaleidoscope.use` instead.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
1b6dc98703
Use `Kaleidoscope.use` instead of `USE_PLUGINS`
...
The latter is being obsoleted, so use the former, newer API.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
bd1f7dfe36
Stop using obsolete functions
...
`USE_PLUGINS` and `event_handler_hook_use` are obsolete, use the proper APIs
instead.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
0cb75c5e7f
Stop using obsolete functions
...
`USE_PLUGINS` and `event_handler_hook_use` are being phased out, stop using them.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
72630bd326
Update the example to use Kaleidoscope.use
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
a8fdb3a5f0
Really fix the example this time...
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
bbf5ae3a08
Updated the example to work with the new LEDControl APIs
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
a5d3a9ff37
Updated to use Kaleidoscope.use instead of USE_PLUGINS
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
4dbc5d5707
Update the example to work with the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
8 years ago
Gergely Nagy
40c843958a
README & example update
...
Use `Kaleiodscope.use` instead of `USE_PLUGINS` in both README and the example.
Also create a separate "Plugin properties" section in the former.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
3518ba605a
Documentation & example update
...
Make it clear that layer keys are considered modifiers by the plugin.
While in that area, use `Kaleidoscope.use` instead of the now deprecated
`USE_PLUGINS` macro.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Craig Disselkoen
1cf8d9afdb
Update for changes to Kaleidoscope-Macros no longer requiring END
8 years ago
Jesse Vincent
769470fbd6
CamelCaseifcation of LED related functions
...
s/led_set_crgb_at/setCrgbAt/
s/hsv_to_rgb/hsvToRgb/
s/led_get_crgb_at/getCrgbAt/
s/led_sync/syncLeds/
s/get_led_index/getLedIndex/
s/send_led_data/sendLedData/
s/led_power_fault/ledPowerFault/
8 years ago
Jesse Vincent
2582441523
CamelCase of KeyIsPressed and KeyWasPressed
8 years ago
Jesse Vincent
0f2bae7db7
keyToggledO* camelcasing
8 years ago
Jesse Vincent
842fa737d6
keyToggledO* camelcasing
8 years ago
Jesse Vincent
4550941ff9
keyToggledO* camelcasing
8 years ago
Jesse Vincent
e6de144198
keyToggledO* camelcasing
8 years ago
Jesse Vincent
72cd5f7db8
Update to work with new simpler Nulock API
8 years ago
Gergely Nagy
9317ec61e2
Migrate from USE_PLUGINS to Kaleidoscope.use
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
efa9cdf291
Migrate to Kaleidoscope.use()
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
98b389411b
Use Kaleidoscope.use instead of USE_PLUGINS
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
150e39b87d
Migrate from USE_PLUGINS to Kaleidoscope.use
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
9d9ef489be
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
f79b3b5f7d
Kaleidoscope Style Guide conformance
...
Also updated to use the new Ranges APIs, while there.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
e8f3495f7c
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
fbd21c0462
Updated the example to use the newest Stalker APIs
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
7ddb1130b4
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
c20732257b
examples/AppSwitcher: Update to use newest HostOS APIs
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
dd7c20a4ee
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
cc4d86a98d
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
9e6b7e22f6
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
8f0cfb753c
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
588e332d12
Update to use the newest HostOS version
...
Also cleaned up the documentation a little, while there.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
129272883a
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
95b34d4eb0
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
d8d4ed7809
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
3a1342b38b
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
da90c342fb
Some more linter-triggered fixes
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
6b2263cfa7
Add an .activate() method
...
To make things friendlier to the end-user, add an `.activate()` alias to
`.nextState()`, and document that.
Fixes #3 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
5d5d8747eb
Fixes to make cpplint partially happy
8 years ago
Jesse Vincent
0f09130069
fixes to make cpplint happy
8 years ago
Jesse Vincent
34ca05501d
Fixes to make cpplint happy
8 years ago
Jesse Vincent
57cf6cbab7
cpplint and astyle fixes
8 years ago
Jesse Vincent
f4b49c30b6
make astyle
8 years ago
Jesse Vincent
d515f0088b
Make the linter happy
8 years ago
Jesse Vincent
df5c08d5d5
astyle with current project style guidelines
8 years ago
Jesse Vincent
a0b2d400db
astyle with current project style guidelines
8 years ago
Jesse Vincent
7ec1fe2908
astyle with current project style guidelines
8 years ago
Jesse Vincent
17487f9c26
astyle with current project style guidelines
8 years ago
Jesse Vincent
e597957ab9
astyle with current project style guidelines
8 years ago
Jesse Vincent
5273b43ba0
astyle with current project style guidelines
8 years ago
Jesse Vincent
ecef342f1f
astyle with current project style guidelines
8 years ago
Jesse Vincent
3865bd8793
astyle with current project style guidelines
8 years ago
Jesse Vincent
fcd1743f3b
astyle with current project style guidelines
8 years ago
Jesse Vincent
b75b3ac960
astyle with current project style guidelines
8 years ago
Jesse Vincent
e29a9454ba
astyle with current project style guidelines
8 years ago
Jesse Vincent
3097fd0745
astyle to get us closer to cpplint-clean
8 years ago
Gergely Nagy
8220369f6f
Kaleidoscope Style Guide conformance
...
Also updated to work with the newest `EEPROM-Keymap` API.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
3b4e2add7d
Conform to the latest Kaleidoscope Style Guide
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
5215e95249
make astyle
8 years ago
Gergely Nagy
cfd80f3f69
Conform to the latest Kaleidoscope Style Guide
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
8c6b8433cc
astyle pass
8 years ago
Gergely Nagy
ba6128dddc
Kaleidoscope Style Guide conformance
...
Updated the code to conform to the latest style guide. And added a bit of
documentation too, while there.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
88fc70f90a
Update whitespace per new astyle rules
8 years ago
Gergely Nagy
38cf866870
Kaleidoscope Style Guide conformance
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
66c8a19f21
Re-run make astyle, with a recent astyle
...
Use astyle 3.0 (included in Kaleidoscope-Plugin) to apply styling, instead of
whatever came with Debian Stretch.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
70e4d15e60
More Style Guide fixes
...
Drop the namespace terminating comment, it is not neccessary, and run astyle
again.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
3e982ba5f6
Kaleidoscope Style Guide conformance
...
Rearranged both in style, and in naming conventions to match the Kaleidoscope
Style Guide, and please the linter too.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
09ba7dd756
Port over to LED-Palette-Theme
...
Fixes #6 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
947019733d
Rename to Kaleidoscope-Colormap
...
Fixes #2 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
7b8ae3c9c0
examples: Fix the example build
...
Include Focus, so the example will build.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
b81cc12708
Initial import
...
Fixes #1 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
437a349288
make astyle
8 years ago
Jesse Vincent
3b32197829
make astyle
8 years ago
Jesse Vincent
26e7e187df
make astyle
8 years ago
Jesse Vincent
a16411ff93
make astyle
8 years ago
Jesse Vincent
69f244b43b
make astyle
8 years ago
Jesse Vincent
1f8fc546e5
make astyle
8 years ago
Jesse Vincent
e1fd94e4ff
make astyle
8 years ago
Jesse Vincent
46d40dd3d5
make astyle
8 years ago
Jesse Vincent
3adb8c28af
make astyle
8 years ago
Jesse Vincent
e3dc58f384
make astyle
8 years ago
Jesse Vincent
c069df3919
make astyle
8 years ago
Jesse Vincent
0489fd9196
make astyle
8 years ago
Jesse Vincent
f2ee554ce6
make astyle
8 years ago
Jesse Vincent
849c87606f
make astyle
8 years ago
Jesse Vincent
517636d479
make astyle
8 years ago
Jesse Vincent
14d236ed39
make astyle
8 years ago
Jesse Vincent
d75939d456
make astyle
8 years ago
Jesse Vincent
97008a28f0
"make astyle
8 years ago
Jesse Vincent
da2adaf96d
Remove "Key_" prefix from ConsumerCtl and Sysctl key defs.
...
It was redundant, made things less readable and lest clear
8 years ago
Jesse Vincent
d9706f6d0d
Bring up to new API
8 years ago
Jesse Vincent
195331d1e8
Bring up to new keymap api
8 years ago
Jesse Vincent
6d232fb7c7
Update to new key api
8 years ago
Jesse Vincent
647e15a4bc
Fix example to match new key definitions
8 years ago
Jesse Vincent
07b3f9a9cd
Update example to new keymap
8 years ago
Jesse Vincent
43a952574a
Bright up to new keymap api
8 years ago
Jesse Vincent
f4e9b476a0
Update to new Key API
8 years ago
Jesse Vincent
543c3b09f2
Update example to match new keymap
8 years ago
Jesse Vincent
a5a3bb6521
Update to new Keymap
8 years ago
Jesse Vincent
308f889313
Update for new Key names
8 years ago
Jesse Vincent
7c3d6644b7
Update to match new Key tables
8 years ago
Jesse Vincent
30a490d218
Update example to match new Key defs
8 years ago
Jesse Vincent
c7eb22c3ec
Update example to match the new Keymap
8 years ago
Jesse Vincent
b8be8d9fe1
Update example for new key defs
8 years ago
Jesse Vincent
5b1068065c
Fix typo
8 years ago
Jesse Vincent
4a52b76553
Fix Control key definition
8 years ago
Jesse Vincent
24f6c8abd4
Updating to new keycodes
8 years ago
Jesse Vincent
c892b4a30a
Update OneShot library to use new key defs
8 years ago
Jesse Vincent
6b75519501
Fixing a number of other key definitions in the example
8 years ago
Jesse Vincent
b0e1554af8
Remove unused key layouts from example
8 years ago
Jesse Vincent
a19f9d1b29
Fix Key definitions in Macro example
8 years ago
Jesse Vincent
ad93cc0a83
Fix spelling of "Control" keys
8 years ago