On the `Upper` layer, we used to have a macro that moved us back to the QWERTY
layer. It was made before we had `MoveToLayer` available. Now that we do have
it, lets use that instead of the macro.
We still keep the macro around, for the sake of compatibility, so that if anyone
who has the old macro in EEPROM, but updates the firmware, will have the key
working still.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
On the `Upper` layer we have a key that takes us back to the QWERTY layer. That
key appeared as `M(QWERTY)` on the keymap, while `QWERTY` was the layer name,
and `LAYER_QWERTY` was supposed to be the macro name. In the macro itself, we
used `Layer.move(LAYER_QWERTY)` - the macro name instead of the layer name.
In practice, this didn't matter, because both ended up resolving to `0`, but the
code did not reflect intention, and was confusing for anyone trying to
understand what's going on.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Due to the introduction of MCU properties recently, we need to declare the class
for virtual builds, and can't get away with simply typedefing it to Base.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
When using the A* pinouts, the bootloader should - by default - be Caterina, not
HalfKay, which should only be used for the legacy Teensy2 pinout.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This drops the now unused `ATMEGA32U4_KEYBOARD`, `ATMEGA32U4_DEVICE_PROPS`,
`ATMEGA_KEYSCANNER_PROPS`, `ATMEGA32U4_DEVICE`, `ATMEGA_KEYSCANNER_PROPS`, and
`ATMEGA_KEYSCANNER_BOILERPLATE` macros.
These were macros that made the code less verbose, but none of them were
future-proof, and all of them were pretty opaque. Using them did not help one to
understand the code.
All use of these have been changed to use the raw structures as-is, which is
more verbose, but much more extensible, and a whole lot clearer in intent
aswell.
Since these are not particularly user facing macros, I opted not to include them
in `UPGRADING.md`, and removed them without prior deprecation.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of using opaque macros which aren't even extensible, just expand them,
and use the raw data structures for the hardware definition. While this is more
verbose than the macros, it is more future proof, and clearer for the reader
too, because they don't need to understand the magic macros.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of using opaque macros which aren't even extensible, just expand them,
and use the raw data structures for the hardware definition. While this is more
verbose than the macros, it is more future proof, and clearer for the reader
too, because they don't need to understand the magic macros.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of using opaque macros which aren't even extensible, just expand them,
and use the raw data structures for the hardware definition. While this is more
verbose than the macros, it is more future proof, and clearer for the reader
too, because they don't need to understand the magic macros.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of using opaque macros which aren't even extensible, just expand them,
and use the raw data structures for the hardware definition. While this is more
verbose than the macros, it is more future proof, and clearer for the reader
too, because they don't need to understand the magic macros.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of using opaque macros which aren't even extensible, just expand them,
and use the raw data structures for the hardware definition. While this is more
verbose than the macros, it is more future proof, and clearer for the reader
too, because they don't need to understand the magic macros.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
While the code became shorter with the previous commit, it did not become much
easier to understand and follow. Some of the choices made weren't self
explanatory. For that reason, lets put comments around the relevant parts, that
explain why we've done it that way.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The `kaleidoscope::Device` aliases are there for use-cases that need to be
device agnostic, we do not need to use them in the hardware plugin itself,
because that plugin _is_ very much tied to the device. We can just use the
device specific original names.
To make things shorter, we can also set up a pair of aliases for
`KeyScannerProps` and `KeyScanner`, to make the declarations even shorter.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
In order to be able to access the devices as the at-seat user, without having to
fiddle with distro-specific permissions and groups, we need to tag it both
`uaccess` and `seat`, and have the rule sorted before the one that applies
permissions based on these tags. As such, the file had to be renamed as well.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
With this, it is possible to set the time (in milliseconds) between scans. The
aim is to make it possible to change this setting in one's `setup()` in their
own sketch.
One can do that as follows:
`Kaleidoscope.device().keyscanner().setScanCycleTime(2000);`
This is currently only implemented for the ATmega keyscanner.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
We use 100kHZ for flashing, because that's more reliable. Use the same for
normal operation, for similar reasons. This appears to fix a frequent crash
issue.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>