This adds additional required configs for the Nordic NRF52840 Dongle (PCA10059),
which was already supported by Zephyr, but didn't have flash settings
and Bluetooth enabled.
Adds some encoder tests for rotating, and basic layers.
Mock Kscans don't seem to interact nicely, slightly on the hacky side.
However, better to have hacky tests than no tests.
Fixes for regressions from split refactors that broke polling mode
specifically.
Co-authored-by: honorless <86894501+lesshonor@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Remove the previous condition on ZMK_SPLIT_WIRED that only enabled it if
!ZMK_BLE. We'll defer to the `depends on` to ensure the DTS exists to
use wired split to make that decision on enabling the feature.
Allow the nice!view widget to display the status of each profile by:
- not adding a circle around the number if the profile is not bound
- drawing a dashed circle around the number if a profile is bound but not connected
Given a typical setup of a battery at ~4 V and a nice!nano v2 running at
3.3 V, I measured a small increase in power usage (using a Nordic PPK2)
when SOC_DCDC_NRF52X_HV was enabled. This changes the nice_nano_v2 and
mikoto boards so this option is disabled by default.
Fixes#2990
Changed CONFIG_ZMK_STUDIO_TRANSPORT_UART to automatically enable itself
whenever a zmk,studio-rpc-uart chosen node is specified. The previous
behavior of enabling if CONFIG_ZMK_USB was enabled broke builds when
CONFIG_ZMK_STUDIO was enabled but the chosen node wasn't specified.
feat(split): Runtime selection of split transport
Allow building multiple split transports, and select an active
one based on the transport availability. Wired split availability
depends on additional `detect-gpios` which must be a GPIO pin
that goes active when a wired connection is present.
feat(split): Suspend/resume wired UART devices.
To better support runtime split support, suspend/resume the UART
as necessary to save power when not using the UART.
docs(split): Document adjusting nRF52 UART interrupt priorities
For wired split on nRF52, you may need to adjust the priority for UART
interrupts lower, to ensure the interrupts used for timing sensitive
BT operations can run when needed, so document this in our pinctrl docs.
refactor(split): Restore use of aync UART on nRF52.
With fixes for Zephyr UART driver, re-enable using async API on nRF52.
fix(split): Minor wired split fixes.
Various minor fixes for wired split to avoid spurious TX in half duplex,
etc.
fix: Unconditionally define HID payloads to avoid error.
Don't conditionally define HID indicator payload, to avoid compilation
errors.
docs(split): Expand on details of split transports.
Expand the split keyboard documentation with a more fleshed out section
on the available split trasnports, and what is and isn't supported by
each, including the runtime selection functionality.
---------
Co-authored-by: Nicolas Munnich <98408764+nmunnich@users.noreply.github.com>
* Reference combos by index, not 32-bit pointers, and store bitfields
instead of arrays in several places, to bring down our flash/RAM usage.
* Use bit field to track candidate combos, to avoid needing an explicit
`ZMK_COMBO_MAX_COMBOS_PER_KEY` setting.
* Determine the max keys per combo automatically from the devicetree,
so we remove the ZMK_COMBO_MAX_KEYS_PER_COMBO Kconfig symbol.
Fix 8 bit truncation of 16 bit scroll values when passed into
functions `zmk_hid_mouse_scroll_set` and
`zmk_hid_mouse_scroll_update`.
Fixes: #2864
Co-authored-by: Tobias Adolph <43353209+adolto@users.noreply.github.comgit>
refactor(split): Refactor split code for extension
Extract central/peripheral code to allow for plugging in alternate
transports, instead of tying all split logic to BT.
feat(split): Add full-duplex wired split support
* Depends on full-duplex hardware UART for communication.
* Supports all existing central commands/peripheral events, including
sensors/inputs from peripherals.
* Only one wired split peripheral supported (for now)
* Relies on chosen `zmk,split-uart` referencing the UART device.
docs: Add wired split config docs.
Migrate split to its own dedicated config file, and add details
on wired split config.
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
fix: Properly override stack size on RP2040
Move the system work queue stack size override on RP2040 ouf of
a `ZMK_BLE` conditional so it is properly applied generally for that
SoC.
---------
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
feat(shields): Add tester_xiao layouts
Added two layouts for the XIAO tester shield:
- Keys arranged to match the XIAO pinout, viewed from the front
- Single row of eleven keys
These layouts are abstractions since the tester_xiao shield may be
used in a situation where the "keys" are actually jumper wires on a
breadboard or the like.
feat(shields): Add tester_pro_micro layouts
Added two layouts for the Pro Micro tester shield:
- Keys arranged to match the Pro Micro pinout, viewed from the front
- Single row of eighteen keys
fix(pointing): Temp layer threading protection.
Ensure all layer operations occur on the system work queue thread.
Fixes: #2719
fix(pointing): Handle layer events to disable events
Make the temp layer input processor propely handle layers getting
deactivated externally before the temp layer timeout.
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
test(behaviors): Add same position sticky key tests
fix(behaviors): Make multiple sticky keys work on same key position
refactor(behaviors): Remove unused param2 in sticky keys
refactor(behaviors): Add max-held tap-dance config
Add new `CONFIG_ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD` config for reducing RAM
usage on more constrained devices.
refactor(behaviors): Move defaults to Kconfig.defaults
Zephyr is still working on the plan upstream for generically controlling
display "backlight" pins with GPIO/PWM, so in the meantime, add our
own chosen property `zmk,display-led` that is set to an LED device child
to allow blanking/unblanking of devices that use a dedicated backlight
control pin.
fix(display): Do LVGL task processing in main on POSIX.
An SDL/Zephyr bug prevents proper display when SDL calls are
made from anything but the main thread, so add task handling
in our simple main function when on POSIX.
fix(usb): Compilation fix for 64-bit targets
Properly handle differences in the size of `size_t` on 64-bit
architectures.
fix(display): Imply, but don't force, LVGL mono theme
Some targets may be using color displays, so instead of forcing
on the mono theme, merely imply it to default it