The GD25Q16 flash connected via QSPI seems to be causing issues
with excessive battery use and inability to sleep. Since ZMK doesn't
use it, disable it.
Resolves#1901
* Split centrals to scan with their identity so they receive direct
advertising packets.
* Split peripherals to use direct advertising if they have an existing
bond to a split central.
Bluetooth bindings are useful for handling pairings with hosts. This
change adds the header and a few default commands as template for
new users to work with.
This commit adds a new GATT characteristics on the peripheral side
and wires it up to read sensor values. The central side subscribes
to this new characteristics and replays sensor values on its side.
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
With ADC pin, maximum 3.6V input needs gain 1/6 to be less than the 0.6V
reference.
With VDDHDIV5, maximum 6V input corresponds to 1.2V so gain 1/2 will be less
than the 0.6V reference and be slightly more precise.
* Add new shield for splitkb.com Aurora Sofle, supporting
keys, encoder(s), displays, and RGB.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Proper usage of bt_uuid_cmp.
* Central's don't start scanning for peripherals if
`ZMK_BLE_CLEAR_BONDS_ON_START` is enabled.
* Split peripherals don't advertize if
`ZMK_BLE_CLEAR_BONDS_ON_START` is enabled.
* Add Leeloo v2
* Leeloo-Micro v1 updates to support Zephyr 3.2
* Refactored for new Encoder Configuration
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Add two new compatibles for macros that
take one or two parameters when bound in
a keymap.
* Use `¯o_param_1to1`, `¯o_param_1to2`, `¯o_param_2to1`,
and `¯o_param_2to2` control entries in the bindings for the macro
to have the next binding entry have it's values substituted.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Add new `steps` property to the `aips,ec11` binding, to make
the driver properly report degrees in the rotation delta channel.
* Handle old sensor values in sensor rotate behavior.
* Refactor sensor events to include channel data,
necessary for prop split encoders, and avoiding duplicate calls,
to fetch channel data twice, etc.
* More consistent behavior driver API.
* Allow setting triggers per resolution at the behavior level optionally.
* Capture the last 6 entered digits, and then require pressing
Enter/Return to submit the entered digits. This matches the
messaging shown on hosts regarding how to complete pairing.
* Fix the wording on the Kconfig menu item to accurately describe
the feature.
Changed the GPIO matrix and direct GPIO key scan drivers to do a single
read per port instead of one read per pin. This is much more efficient
for some types of GPIO drivers, such as I2C GPIO expanders.
To accomplish this with minimal overhead, we now sort input pins by port
at driver init. if we iterate through the pins in the sorted order, all
pins on the same port are consecutive, so we only need to read each port
once the first time we see it.
Add CONFIG_ZMK_DISPLAY_INVERT Kconfig to invert colors
(black-on-white to white-on-black) on monochrome screens.
Currently applies only if CONFIG_LV_USE_THEME_MONO is selected,
which is the default unless user overrides it.
All displays currently used with ZMK are monochrome so it makes sense
to enable the mono theme by default, which can be disabled by the user
since we use the "imply" statement.
Without this theme setting, the small font size selection for widgets
at the bottom of the stock status screen does not work.
Adds support for the CKP family of boards
BT60V2 ANSIHotswap, ISO Hotswap, ANSI Lowpro and soldered
BT65 ANSI Hotswap, ISO Hotswap and soldered
BT75 ANSI Hotswap and soldered
The BT65 and BT75 are stylised as btXX_v1 in order to maintain compatibility with customers existing zmk-config setups in the same way the BT60 V1 was handled when merged into main.
CKP boards have identical pinmapping between hotswap and soldered so there's only one set of defconfig, dts, keymap, yaml and yml files per size
* Reports of constant/frequent disconnects, with HCI err 0x28,
"instant passed", seem linked to newer LLCP that became default
in Zephyr 3.2, so revert to the Legacy LLCP for now until a
proper fix for new LLCP can be found.
Added a workaround to select the latest version of Prettier with
pre-commit, since the pre-commit mirror repo started tracking alpha
releases and doesn't have anything beyond 2.7.1.
Updated existing pre-commit hooks and added some new hooks:
- Remove trailing whitespace
- Ensure every non-empty file ends with a new line
- Check YAML file validity
- Prevent adding large files
- Ensure any scripts with shebangs are executable
Added a GitHub action to run pre-commit on every commit. Removed any
existing actions which duplicate pre-commit.
Ran pre-commit on the codebase.
* Add new sensor behaviors that either take full bindings
add definition, or accept parameters when bound in the
keymap.
* Remove existing hard-coded key press sensor behavior
and instead leverage new generic sensor behaviors to
achieve the same functionality.
Co-authored-by: nick@conway.dev
Extended the virtual key position system from combos so that each sensor
also gets a virtual key position. This allows sensor behaviors to use
the behavior queue API.
Before this change, if a matrix position was not present in the transform,
various incorrect behaviors would happen:
1) In some cases out-of-bounds accesses:
Note that the size of the`transform[]` array does not necessarily match
the size of the matrix. So for example if key position
(ZMK_MATRIX_COLS-1, ZMK_MATRIX_ROWS-1) is not present in the transform,
but ends up being pressed, then the array will be accessed beyond its
size, and any data could be returned.
2) In other cases the 0th position in the keymap will be used because
the `transform[]` array is initialized to all zeros.
Fixed an issue where the sticky key behavior would call
ZMK_EVENT_RAISE_AFTER(), which would free the provided event, but then
it would keep using that now-freed event data.
When enabling our high level USB logging, disable the USB driver
logging itself entirely, to avoid logging in the driver causing
errors when USB isn't up yet to send the logs.
* Move away from DT_LABEL.
* Move to DEVICE_DT_GET for non-behavior device access.
* Move various drivers to `gpio_spec_dt` and `DT` related macros.
* Remove mcp23017 while at it, since better upstream driver is
available.
* LV_ prefix from new LVGL official Kconfig now used.
* API changes for themes, container object removal, etc.
* Add our own Kconfig and code for theme default small font.
* Remove some hardcoded sizes.
The default configuration for corneish-zen enables a USB CDC endpoint by
default. This is most probably a debugging left-over. Disable that
endpoint. CONFIG_ZMK_USB_LOGGING depends on it anyway, so it will be
enabled again with that config option set.
- Asterisk in layer 1 was mapped to 8
- Underscore in layer 1 was mapped to minus
- Right GUI in layer 0 was mapped to right Alt
- Space in layer 1 was mapped to Return
- Plus was mapped with KP_PLUS
* Add to metadata schema for interconnects.
* New conventional location for pinout diagrams/pics.
* New component to generate the tabs for the new shield
doc section on interconnects.
* Add XIAO and arduino uno pinout diagram.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Added ZMK_MACRO_DEFAULT_WAIT_MS and ZMK_MACRO_DEFAULT_TAP_MS to set
global defaults for the wait-ms and tap-ms properties of macros.
Also reduced the default timings for macros, since it's been reported
many times that 100 ms is too slow.
* Add blackbill interconnect metadata.
* Add config/overlay for upstream blackpill boards to work with ZMK.
* Add pillbug board.
* Updated new shield docs.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Added overlays to support building for the nRF5340 development kit.
Also added some documentation on how to build and flash ZMK for dual-
chip Bluetooth configurations, with an example for the nRF5340.
* Update docs for mod-morph
* Add unit tests for mod-morph
* Add keep-mods to DT binding
Co-authored-by: Martin Aumüller <aumuell@reserv.at>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Update planck_rev6.keymap
Third layer was causing problems so i moved reset and bootloader to second layer
* BT_sel functions
A customer requested this so we added it
* Update crbn.keymap
Co-authored-by: Nick Winans <nick@winans.codes>
All credit for this one goes to @xudongzheng (thanks for helping debug
this!). Should fix the issue where keyboards go unresponsive after their
host machine wakes from sleep due to the USB driver entering an error
state. I was able to both reliably reproduce the issue before the patch
goes in and confirmed it no longer occurs post patch.
The `USB_DC_RESUME` state indicates the host event has resumed the connection.
Adding it to the list of valid connection states to prevent the error
when waking from sleep.
Zephyr API Link:
https://docs.zephyrproject.org/apidoc/latest/group____usb__device__controller__api.html#gac09e3e0af1a2b41a5bfbad91f900baf7fixes#1372
* This is a very simple fix to a rather complicated issue. Essentially,
hold-taps will "release" (raise) their captured keys before actually
telling the event manager they have captured a key. This means the event
manager ends up assigning the `last_listener_index` to the hold-tap
subscription rather than the combo. So when the combo calls
`ZMK_EVENT_RELEASE` it raises after the hold-tap instead of after the
combo as the combo code expects.
* The corresponding test (which fails without this change) has also been added.
* An event can be captured and released in the same event handler, before
the last_listener_index would have been updated. This causes some handlers
to be triggered multiple times.
* The solution is to update the last_listener_index before calling the next
event handler, so capturing and releasing within an event handler is harmless.
* Also see discussion at https://github.com/zmkfirmware/zmk/pull/1401
* If our handler dedides our undedided hold-tap,
return early before continuing.
* Fix incorrect pointer logic, resulting in combo
candidate filtering leaving incorrect timeout details.
Co-authored-by: Andrew Rae <ajrae.nv@gmail.com>
Co-authored-by: okke <okke@formsma.nl>
* add support for Spaceman Pancake
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Jason Hazel <jhazel@matrixmediaservices.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Add optional Kconfig setting to delay scanning after each
output column is set, and inputs are read, to allow inputs
to "settle" after the last column is set back to inactive.
Two new options for functionality to enable/disable RGB for
USB status or idle events.
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: ReFil <harryherring@gmail.com>
* Proporly handle multiple conditonal layers w/ the same target
`then-layer` values.
* Move handling to work callback, to avoid re-entrance for cascading
layers enabling other layers.
* Move to ZephyrBuildConfig package based on Zephyr best practices.
* Support multiple shields properly, e.g. -DSHIELD="foo bar", which
allows using existing upstream shields like `ssd1306_128x64` along
with another ZMK shield.
* Properly *add* the "ZMK config" .conf file to the conf file list,
so that existing board .conf files in `app/boards/<board>.conf` are
properly honored still. Needed for overrides to usptream boards when
combined with a local `<shield>.conf` file.
* Add new API/status to track state of the
peripheral connection to the central.
* Add new peripheral status widget for displaying
the current status of the connection to
the central.
Rewrote the direct GPIO kscan driver to match the improvements made to
the matrix driver in 82cb762698 and
f946dc6893. It now uses the same
debouncing system as the matrix driver.
* Remove MISO pin from pinctrl for BDN9 rev2 board, to avoid
the 4th switch being set up for an alternate function, which
was causing spurious key press events to be triggered.
CONFIG_ZMK_BATTERY_NRF_VDDH and CONFIG_ZMK_BATTERY_VOLTAGE_DIVIDER are
now automatically enabled if a DT node with the matching "compatible"
property is present and enabled, so they no longer need to be manually
set for each board.
The key scanning drivers are now automatically enabled when a DT node
with the matching "compatible" property is present and enabled, so they
no longer need to be manually set for each board.
battery.c now uses the zmk,battery chosen node to select a battery
sensor. Using the node labeled "BATTERY" is maintained for backwards
compatibility but is now deprecated. Custom boards should switch to
using the chosen node.
# Conflicts:
# app/boards/arm/bluemicro840/bluemicro840_v1.dts
# app/boards/arm/nice60/nice60.dts
# app/boards/arm/nrfmicro/nrfmicro_13.dts
# Conflicts:
# app/boards/arm/bluemicro840/bluemicro840_v1.dts
* Allows removing multilib from docker images
* Run properly in aarch64 host docker
containers for testing on Rasberry Pi.
* Small sticky-keys fix to initialize w/ correct
constant for max uin32_t value.
* Document the Seeed(uino) XIAO interconnect
* Add metadata files for two upstream boards, XIAO and XIAO BLE.
* Add conf and overlay files to properly configure the boards
for ZMK use.