While we do not currently support any other compiler than the gcc suite, we
eventually want to. Meanwhile, we also want to be able to easily switch to gcc
when that's not the default on the system.
For this reason, we introduce `KALEIDOSCOPE_COMPILER`, which can be set to `gcc`
or `clang`, and `kaleidoscope-builder` will then set up the appropriate
basenames.
This, combined with the previous change, allows us to easily select gcc for
virtual builds, even when clang is the default on the system.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
When doing virtual builds, we never want to use the arch prefix. We want to use
the compiler as set.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This feature is currently only available on Linux, but we don't want a
platform-specific guard - not in itself, anyway - so guard it with
`KALEIDOSCOPE_VIRTUAL_HOST_EVENTS`, _and_ a linux-guard within.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
we do not currently plan to have a v2 anytime soon. Lets just merge the v1
namespace into the main one.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
To make their purpose clearer, rearrange our state: we now have the row-based
array on the top level, instead of every member being an array on its own. The
name of the state variable was changed to `matrix_state_`, to reflect its
purpose. This also allowed us to have its members be named `current`,
`previous`, `debouncer` and `masks`.
All devices using these APIs, and the documentation were updated accordingly.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
We want `readCols` as a separate function, so we can tell the compiler to apply
different optimizations to it.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This is a typedef that defines what type we need to use for storing row states.
Defaults to uint16_t. For boards with 8 columns or less, we can use `uint8_t`,
but the default is 16 bits.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This makes it easier to initialize them in the cpp (shorter too!), and reduces
code size as well. It's also a bit simpler to understand the initialization
part, because it's no different from the props init.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>