Commit Graph

1313 Commits

Author SHA1 Message Date
Joel Spadin
05925c72d7 refactor(ext_power): Remove label property
Changed the label property on zmk,ext-power-generic to be optional and
removed it from existing uses. Renamed the nodes for all non-development
boards to "EXT_POWER" to preserve user settings.

rgb_underglow.c now finds the correct device by finding the first
instance of zmk,ext-power-generic instead of looking for a node named
"EXT_POWER".
2023-12-04 20:06:54 -06:00
Joel Spadin
179bdbc41a refactor(behaviors): Make label property optional
Changed all code (except for layer names) which used the label property
to use DEVICE_DT_NAME() instead, which uses the label if set or falls
back to the full node name. This matches how Zephyr determines the node
names used with device_get_binding() and allows us to start removing the
deprecated label property from things.
2023-12-04 20:06:54 -06:00
ReFil
dbe5dfb1d8
feat(split): Add is_bonded function to peripherals
There is already a function to see if the peripheral is connected, a matching one for if it's bonded is a useful addition for displays/indicators. `is_bonded` gets reset to false in the advertising function in preparation for runtime peripheral bond clearing
2023-12-04 18:31:35 -05:00
ReFil
9bacaffe62
feat(hid): Add KConfig option for higher NKRO usages
By default the maximum NKRO usage is set to maximise compatibility, but some keys dont work, this adds the ability to use those extended keys, at the cost of compatibiltity

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2023-12-04 18:24:05 -05:00
Peter Johanson
55aed8e89d feat(tests): Add ability to auto-accept test diff. 2023-12-02 17:11:45 -08:00
Peter Johanson
693530c2f1 feat(bluetooth): Initial nRF52 BSIM based test support.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-12-02 17:11:45 -08:00
Peter Johanson
da15564d0e feat(bluetooth): Build on ARCH_POSIX. 2023-12-02 17:11:45 -08:00
Peter Johanson
3fad4dba07 fix(bt): Passkey entry pairing fixes.
* Don't propogate any key press events while in the
  middle of passkey entry, avoid funky state on hosts.
* Handle passkey on release, not press, to ensure key *releases*
  are not accidentally sent, especially the Enter release
  at the very end of passkey entry, which can trigger
  cancel in the dialog if the keyboard is connected
  via USB to the same host.
2023-12-01 16:48:46 -08:00
Peter Johanson
329d6474ee feat(ble): Make it possible to use BT_GATT_AUTO_SEC_REQ
* Only upgrade security of new connections if BT_GATT_AUTO_SEC_REQ
  is not enabled.
2023-12-01 16:47:49 -08:00
Peter Johanson
744f70c80c feat(bt): Add support for unauth overwrite
* Properly handle the user enabling the
  `CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE`
  Zephyr flag and handle re-pairing to an existing taken
  profile from the same address.
2023-12-01 23:39:31 +00:00
ReFil
69f7bfb409
feat(boards): Kinesis Advantage 360 pro
Add the Kinesis Advantage 360 Pro board definition.
2023-11-27 19:09:58 -05:00
Peter Johanson
817ce8764f refactor: Move to zmk_hid_indicators_t type. 2023-11-27 16:03:18 -08:00
Alessandro Bortolin
d9bb0d7d0e feat: LED indicators on peripheral side 2023-11-27 16:03:18 -08:00
Alessandro Bortolin
4e55c5f6e9 feat: handle LED indicators report 2023-11-27 16:03:18 -08:00
ReFil
6276e973d5 feat(ble): Only update BAS when active
Subscribes to the activity changing event, will stop the battery work timer when in idle or deep sleep, restart when board goes active
2023-11-27 09:58:20 -08:00
Chris Andreae
0a4b1a6533
feat(ble): add behavior to disconnect from BLE profile
Adds new functionality and a behavior to disconnect an active BLE connection.
The motivation for this is that for some devices like phones, the presence of an
active BLE connection results in the onscreen keyboard being selected.
2023-11-20 15:00:10 -05:00
Alexander Krikun
d7d9eed317 feat(mouse): Initial mouse keys support.
* Add HID report/descriptor for a new report with mouse buttons,
  and x/y/wheel deltas.
* New mouse key press behavior for press/release of mouse keys.
* Add constants for HID main item values (e.g. data/array/absolute)
* Define and use constants for our HID report IDs.
2023-11-15 11:16:59 -08:00
ReFil
8776911da5
feat(ble): Allow disabling BLE BAS reporting
The battery reporting has been known to cause macOS computers to wakeup repeatedly. In some cases (e.g. display or custom lighting implementation) one might want to collect battery SOC without broadcasting over BLE

* Update docs/docs/config/battery.md

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-11-15 13:03:30 -05:00
Peter Johanson
3027b2a6e8 chore(usb): Don't enable ZMK_USB_ROOT by default.
* Some initial reports of crashes with this code enabled, so disabling
  by default for now pending further investigation.
2023-11-13 23:56:10 -08:00
Peter Johanson
f6716f869a fix(usb): Build with ZMK_USB_BOOT disabled.
* Invert the logic so `get_keyboard_report` is sane when `ZMK_USB_BOOT`
  is disabled.
2023-11-13 23:56:10 -08:00
Chris Andreae
2a1904e184
feat(boards): Add Glove80 to boards
* Add board definition for MoErgo Glove80
2023-11-14 02:08:58 -05:00
Peter Johanson
964c54139d fix(usb): Tweak how ZMK_USB gets enabled.
* Previous version of multiple overrides of the default value of ZMK_USB
  were problematic. Move to using board _defconfig files for the
  defaults for those, along with proper `depends on` for ZMK_USB that
  accounts for split and split roles.
2023-11-13 12:56:23 -08:00
Chris Andreae
91aa3378f3
feat(usb): Add boot protocol support
* USB boot protocol support
* Use a single definition of a boot report, used for regular reports in
  non-6KRO, and for rollover in all branches.
* Handle gaps in the zmk report when producing a boot report in HKRO mode. For
  .example, if it was 8KRO, it would be possible to have the state 0 0 0 0 0 0 0
  17 (by pressing 8 keys, and letting go of the first 7). Copying the first 6
  bytes would not show up the single pressed key.
* Disable usb status change and callback on SOF events:
  SOF events were introduced by the boot protocol changes, and required internally
  by Zephyr's idle support, but are unused within ZMK itself. Ignore them in the
  usb status callback.

---------

Co-authored-by: Andrew Childs <lorne@cons.org.nz>
2023-11-13 13:04:04 -05:00
Peter Johanson
c2d220fbdf refactor(hid): Use proper defines for HID values.
* Add report ID defines and use them consistently.
* Add defines for main item value flags to avoid magic constants.
2023-11-08 16:00:19 -08:00
Peter Johanson
34c8b3f1e3 refactor: Update boards/shields for encoders.
* Update existing boards/shields for new `steps` and
  `triggers-per-rotation` set up.
2023-11-03 12:35:25 -07:00
Khalid Aj
7fe9ecd87f
feat(shields): Add Reviung53 shield.
* Initial Reviung53 shield

---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-17 18:43:50 -04:00
Alex Kang
a9a53e6da4
feat(shields): Reviung34 shield definition
* Initial implementation of REVIUNG34 shield.
* Add copyright information to files
* Added a README with instructions on how to enable the 1x2u layout.
* Add a default chosen matrix transform in the default keymap, alongside a commented out version for the alternate layout.

---------

Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-14 19:39:42 -07:00
Peter Johanson
3ab922822c feat(shields): Add ZMK Uno nice!view support.
Export the `nice_view_spi` node properly from the ZMK Uno overlay
to ensure the shield will work when built along with the `nice_view`
shield.
2023-10-14 10:51:48 -07:00
Diogo Doreto
6af22424f1 feat(shields): add right encoders support to waterfowl 2023-10-09 11:46:05 -07:00
Joel Spadin
8a84b7dd5b
fix(shields): Fix incorrect union access in nice view
Fixed an error in a previous commit where a member of the selected
endpoint was used without checking if it was the correct transport type.
The nice!view status screen displays the active BLE profile regardless
of whether BLE is active, so we have to get that data directly from the
BLE code instead of from the selected endpoint.
2023-10-08 19:30:23 -04:00
Alex Kang
fd05478897
feat(shields): Microdox V2 shield definition
* Refactor common parts of the Microdox sheild into a separate file. This is in preparation for adding Microdox V2 as another shield in the same directory.
* Refactor Microdox keymap into a common file in preparation for Microdox V2
* Add Microdox V2 shield definition
* Added a README to explain v1/v2 differences.
2023-10-06 15:27:38 -04:00
Seth Milliken
df92b0e37d
feat(shields): sofle: add underglow support with &pinctrl update
* Sofle Shield: Add underglow support

---------

Co-authored-by: Kim Streich <kim@infusedinsight.com>
Co-authored-by: Seth Milliken <seth_zmk@araxia.net>
2023-10-04 11:48:46 -04:00
Andrew Rae
11996ff7f0 refactor(behaviors): Final global-quick-tap deprecation. 2023-10-03 01:12:47 -07:00
Andrew Rae
f0f6d61e79 fix(tests): Updating old tests includes 2023-10-03 01:12:47 -07:00
Andrew Rae
b85ffa4b6c refactor(behaviors): global-quick-tap -> require-prior-idle
Renaming global-quick-tap-ms to require-prior-idle.
2023-10-03 01:12:47 -07:00
Andrew Rae
77eb44ba9b feat(behaviors): Adding global-quick-tap-ms for combos
This brings the 'global-quick-tap' functionality to combos by filtering
out candidate combos that fell within their own quick tap term.

I also replaced `return 0` with `return ZMK_EV_EVENT_BUBBLE` where appropriate.
(I assume this was done in past as it is similar to errno returning, but
being that this is to signify an event type I find this more clear)
2023-10-03 01:12:47 -07:00
Andrew Rae
2f6abff3bc refactor(behaviors): Giving global-quick-tap its own term
Detaching the global-quick-tap functionality from the quick-tap term.
This makes way for two improvements:

1. This functionality can be added to combos under a unified name
   'global-quick-tap-ms'.

2. This allows users to set a lower term for the 'global-quick-tap'
   (typically ~100ms), and a higher term for the regular
   quick-tap (typically ~200ms)

This deprecates the global-quick-tap option, however if it is set, the
quick-tap-ms value will be copied to global-quick-tap-ms.
2023-10-03 01:12:47 -07:00
Flo Kempenich
aa4cb143bf
fix(combos)Fix bug with overlapping combos timeouts (#1945)
* Fix bug with overlapping combos timeouts

* Fix trailing whitespace

* Fix log format
2023-10-03 04:03:59 -04:00
Joel Spadin
6a3cc914fc fix: Fix nice_view display widgets 2023-10-02 22:03:08 -07:00
Joel Spadin
b17d896c5c fix: Address review comments 2023-10-02 22:03:08 -07:00
Joel Spadin
651ed05e9a refactor: Split endpoint to transport and instance
Changed the endpoints code to rename the existing endpoint types to
"transport" and add the concept of "endpoint instances". A transport is
the method by which data is sent, while instances allow describing
multiple endpoints that use the same transport (e.g. bluetooth profiles)

Also added new APIs to get the total number of possible endpoint
instances and assign each instance a unique index, which can be used
for tracking separate state for each endpoint in other code files.
2023-10-02 22:03:08 -07:00
Andrew Rae
2f05ad55ca fix(core): Prevent pre-releasing explicit mods. 2023-10-02 12:28:02 -07:00
Andrew Rae
dffdb2365e test(core): Adding coverage for key pre-releasing.
Added cases for the two use cases I know of:
    1. Rolling with key-repeat behavior
    2. Rolling symbols that have the same base key, eg `+=`
2023-10-02 12:28:02 -07:00
Andrew Rae
933e369d7c feat(core): Adding pre-release for keys that were already pressed.
This fixes #1207 and #1076 (and maybe more?).
2023-10-02 12:28:02 -07:00
ReFil
c1ebadcd2a
feat(hid): Add apple globe keycode
* feat(hid): Add apple globe keycode
* Update docs/src/data/hid.js

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Nick Coutsos <nick@coutsos.com>
2023-09-29 13:14:31 -07:00
zhiayang
9b3d2cb99f
fix(driver): Fix broken compilation for MAX7318 driver 2023-09-28 12:19:14 -04:00
ClicketySplit
07c82836e0
fix(shields): Leeloo-Micro set status disabled for encoders. 2023-09-28 11:54:08 -04:00
zhiayang
8abc449cc2
feat(drivers): add driver for MAX17048 fuel gauge
Add driver for MAX17048 fuel gauge for battery reporting.
2023-09-25 21:04:03 -04:00
Peter Johanson
28ce23d489 chore(tests): Move to proper header name. 2023-09-16 11:52:40 -07:00
Peter Johanson
0ca7f69b6d refactor: Promote debounce to exposed mod lib.
* Promote previously local debounce code from kscan drivers to exposed
  module lib, for use with other drivers as needed.
* Refactor existing kscan driver to new "public" API.
2023-09-16 11:52:40 -07:00
Peter Johanson
c28ef1b61e refactor(drivers): Use proper init stage/priority.
* Avoid APPLICATION stage and use the proper earlier stage for
  kscan drivers.
2023-09-16 11:52:40 -07:00
Peter Johanson
690bc1bb44 refactor: Move drivers into properly module.
* Align our driver module layout to properly match Zephyr conventions,
  allowing proper CMake setup to amend the library for each type of driver.
2023-09-16 11:52:40 -07:00
Cem Aksoylar
7f9e9f8c64 fix(boards): Disable QSPI for Xiao BLE
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
2023-09-05 22:40:25 -07:00
Peter Johanson
718500543b feat(split): Use directed advertising.
* 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.
2023-09-04 13:54:07 -07:00
Peter Johanson
647945d9f8 feat(shields): Add splitkb.com Aurora Helix
* Add new shield for splitkb.com Aurora Helix, supporting
  keys, encoder(s), displays, and RGB.
2023-09-03 22:39:10 -07:00
フィルターペーパー
ac0691471f feat(shields): Add Bluetooth bindings to kyria keymaps
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.
2023-09-02 23:08:17 -07:00
Xudong Zheng
544612c8c0 fix(split): reserve peripheral slot before stopping scanning
In the event that the peripheral MAC address does not match, this allows
scanning to continue.
2023-09-02 23:06:41 -07:00
Mikhail Stralenia
185457bc11
fix(shields): leeloo - proper encoder status for split encoders. 2023-08-29 08:53:30 -07:00
Peter Johanson
a92a4967aa fix(sensors): Only accept data once per behavior.
* Don't accept data for the same behavior on multiple layers more than
  once, to avoid duplicate/extraneous triggers.
2023-08-27 19:52:03 -07:00
Stephen Wan
9d44229800 feature(split): add support for sensors from peripheral
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>
2023-08-27 19:52:03 -07:00
Xudong Zheng
e65a7e3075 fix(battery): change nRF52 ADC gain
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.
2023-07-29 23:04:35 -07:00
Xudong Zheng
cb9c573b53 refactor(underglow): turn underglow off in low priority work queue 2023-07-24 17:04:51 -07:00
Xudong Zheng
9a963abfc8 refactor: use low priority workqueue for underglow and battery reporting
Blocking operations on the high priority system workqueue may result in
deadlocks, particularly when Bluetooth is in use.
2023-07-24 17:04:51 -07:00
Peter Johanson
f743d57ff1 feat(shields): Add splitkb.com Aurora Sofle
* 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>
2023-07-22 23:16:49 -07:00
Peter Johanson
147f7f23dc fix(shields): Make settings_reset more flexible.
* Don't reference `pro_micro` nexus node in settings_reset
  so it can be used with other controllers.
* Use mock kscan node instead.
2023-07-21 10:41:23 -07:00
Peter Johanson
5f6a13413b fix(bluetooth): Split improvements
* 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.
2023-07-21 10:41:23 -07:00
Peter Johanson
54c2e8e155 feat: Add more logging to peripheral settings. 2023-07-21 10:41:23 -07:00
Peter Johanson
ed400c4feb fix(bluetooth): Corrected use of bt_addr_le_cmp
* Properly compare to zero when comparing LE addresses.
2023-07-21 10:41:23 -07:00
Peter Johanson
73e1b526d5 fix(bluetooth): Properly clear peripheral slots
* When the clear bonds Kconfig is set, also clear peripheral
  address slots addresses from settings as well.
2023-07-21 10:41:23 -07:00
Cem Aksoylar
ee1e135104
fix: Proper battery sensor Kconfig dependencies.
Properly make the battery sensor Kconfig symbols depend
on `SENSOR` config, and minor battery reporting Kconfig
symbol dependency fix.
2023-07-19 02:21:09 -04:00
Nick Winans
51a4be8935 fix(displays): Don't enable built-in widget configs by default 2023-07-19 00:13:16 -06:00
Nick Winans
18a2b76bf0 feat(nice!view): Custom widgets 2023-07-19 00:13:16 -06:00
ClicketySplit
aaf9958d86
feat(boards): Leeloo v2 and V2 Zephyr 3.2 fixes
* 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>
2023-07-17 17:26:27 -04:00
Kyle McCreery
3772ecb04e
fix(boards): Update pillbug_defconfig to enable pinctrl 2023-07-05 10:50:19 -06:00
Peter Johanson
b259d5a22e fix(sensors): Sensor rotate behavior fix for layers.
* Properly return transparent value when processing mode
  for higher disabled layers means the processing is ignored.
2023-06-20 17:36:37 -06:00
Peter Johanson
805dd4a53b feat(behaviors): Support parameterized macros.
* Add two new compatibles for macros that
  take one or two parameters when bound in
  a keymap.
* Use `&macro_param_1to1`, `&macro_param_1to2`, `&macro_param_2to1`,
  and `&macro_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>
2023-06-20 11:19:28 -06:00
Xudong Zheng
e686fce4d9 refactor(split): allow central to define connection parameters
Fixes #1614
2023-06-19 20:48:31 -06:00
Peter Johanson
753802cd79 fix(sensors): Clean ups based on code review. 2023-06-18 20:45:06 -06:00
Peter Johanson
3a91b32513 refactor(sensors): Use "sensor index" consistently 2023-06-18 20:45:06 -06:00
Peter Johanson
8b29f6d345 refactor(sensors): Split data handling from triggers.
* All sensor behaviors should see sensor data, then selectively
  only have some trigger their behaviors.
2023-06-18 20:45:06 -06:00
Peter Johanson
d781ec795b refactor(bluetooth): Add battery reporting config.
* Add dedicated battery reporting Kconfig that is `imply`d by
  enabling ZMK_BLE.
2023-06-18 20:45:06 -06:00
Peter Johanson
f8aaaff556 refactor(shields): Updated ZMK Uno encoder config.
* Move to new steps/triggers-per-rotation config.
* Leverage QDEC Nordic driver when used on Nordic DK.
2023-06-18 20:45:06 -06:00
Peter Johanson
621d946d29 refactor(bluetooth): Bump HoG stack size.
* Bump the default stack size for the HoG processing thread
  to avoid issues w/ some pathways.
2023-06-18 20:45:06 -06:00
Peter Johanson
f0f7e2081b refactor(config): Select SENSOR as needed.
* Don't force on SENSOR Kconfig setting unless
  needed based on the detected DT.
2023-06-18 20:45:06 -06:00
Peter Johanson
295ed83409 refactor(sensors): ec11 rotation sensor value in degrees.
* 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.
2023-06-18 20:45:06 -06:00
Peter Johanson
2244bd3d81 refactor(sensors): Sensor event channel data, resolution tweaks.
* 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.
2023-06-18 20:45:06 -06:00
Joel Spadin
dcf5e75fa6 fix(boards): Bump nRF5340 DK I2C buffer size
Increased the I2C buffer size again, since it needs to be at least 641
to support 128x64 displays.
2023-06-18 14:57:06 -06:00
Joel Spadin
9ff1eaeb5a fix: Enable BT_TINYCRYPT_ECC when using HCI
BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY to work on setups
that use BT HCI like the nRF5340.
2023-06-18 14:52:45 -06:00
Xudong Zheng
5d9ae8fffa feat(split): allow central to connect to multiple peripherals 2023-06-05 16:22:41 -06:00
Peter Johanson
f08802eaa7 fix(boards): Proper i2c pinctrl for BlueMicro840
* Use the proper pin assignmets after the move to pinctrl for the
  Zephyr 3.2 migration.
2023-06-05 00:05:44 -06:00
Peter Johanson
19d883cdfe fix(bluetooth): Passkey pairing improvements.
* 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.
2023-06-05 00:01:44 -06:00
Joel Spadin
b276a3bfb0 refactor(kscan): batch GPIO reads by port
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.
2023-05-28 23:33:34 -06:00
Xudong Zheng
1adfcf92bf refactor(split): fix inconsistency in Kconfig names 2023-05-28 22:58:31 -06:00
Peter Johanson
5aac2743b1 fix(bluetooth): Improved checking for conn status.
* Check the actual connection status before considering
  a discovered connection as connected.
2023-05-22 23:09:40 -06:00
Cem Aksoylar
864394b40a feat(display): Add setting to invert display colors
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.
2023-05-21 21:51:36 -06:00
Cem Aksoylar
7e29166c6c refactor(display): Clean up unused theme Kconfig 2023-05-21 21:51:36 -06:00
Cem Aksoylar
b021d19255 fix(display): Imply LVGL mono theme when display is enabled
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.
2023-05-21 21:51:36 -06:00
digger vermont
89d71ed2c2
feat(boards): Add KBDfans Tofu65 2.0 board
* Initial commit of Tofu65 2.0 board

---------

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2023-05-18 17:47:36 -06:00
Alexander Krikun
94789a092c fix(boards): unify board I2C configuration, use TWI driver 2023-05-04 22:51:54 -07:00
Cem Aksoylar
0239f18b61 feat(boards): Add Corne-ish Zen v1 2023-04-25 23:57:16 -07:00
Cem Aksoylar
39d7f86f70 refactor(boards): Make Zen dtsi non-v2 specific 2023-04-25 23:57:16 -07:00
Cem Aksoylar
4a9c59317f refactor(boards): Add back default matrix transform to Zen v2 chosen node 2023-04-25 23:57:16 -07:00
Cem Aksoylar
2c70048bee refactor(boards): Remove duplicated Zen v2 Kconfigs and unused font size 2023-04-25 23:57:16 -07:00
Cem Aksoylar
ab65ffc114 refactor(boards): Fix Zen v2 DTS spacing inconsistencies 2023-04-25 23:57:16 -07:00
Peter Johanson
a6787b08c7 refactor(underglow): Tad more logging. 2023-04-25 23:53:17 -07:00
ReFil
db08e041c6
feat(boards): Polarity works CKP Series
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
2023-04-25 13:37:33 -04:00
Peter Johanson
e52e734480 chore: Fix formatting of Kconfig setting. 2023-04-24 23:01:48 -07:00
Peter Johanson
de152fe741 fix(bluetooth): Revert to Legacy LLCP
* 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.
2023-04-24 22:41:03 -07:00
Joel Spadin
5b07c86d05 chore: Update Prettier
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.
2023-04-24 16:07:04 -07:00
Joel Spadin
94061bb916 refactor: Replace tabs with spaces
Standardized indentation to use spaces with a new pre-commit hook.
2023-04-24 16:07:04 -07:00
Joel Spadin
32ae776c42 refactor: Add more checks to pre-commit
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.
2023-04-24 16:07:04 -07:00
Peter Johanson
53dea223b7 feat(shields): Add splitkb.com Kyria Rev3. 2023-04-24 01:20:51 -07:00
Nick Conway
3db163aa2c feat(behaviors): Add reusable sensor behaviors.
* 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
2023-04-21 21:13:31 -07:00
Peter Johanson
9a73650041 fix(boards): Move nice!60 to SPI3 for underglow
* Move to SPI3 for underglow peripheral, needed after the
  move to pinctrl.
2023-04-21 11:41:10 -05:00
Joel Spadin
5c6f21b0e0 fix: Fix compiler warnings in sensor code 2023-04-18 00:20:57 -07:00
Joel Spadin
e7a6e4016d feat(behaviors): Add key position to key events
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.
2023-04-16 23:53:12 -07:00
Cem Aksoylar
f1b138cbf0 fix(boards): Fix Zen logo alignment 2023-04-14 14:39:54 -07:00
Purdea Andrei
309359b32f
fix(keymaps): fix keypresses that are not in the transform
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.
2023-04-10 03:27:19 -04:00
Xudong Zheng
ee9fcec3c9 feat(core): Process log every 100ms 2023-04-09 23:29:22 -07:00
Xudong Zheng
a20b9502bc feat(core): Add RTT logging Kconfig option 2023-04-09 23:29:22 -07:00
Xudong Zheng
3f48062225 feat(core): Add Kconfig option to exclude debug log messages 2023-04-09 23:29:22 -07:00
nguyendown
702d79c108
test(behaviors): add unit tests for sticky key quick-release
Duplicate the existing tests with `quick-release` enabled:
- 8-lsk-osk-combination-quick-release
- 10-callum-mods-quick-release
2023-04-10 01:50:57 -04:00
Cem Aksoylar
3c8f55ede0 fix(display): Do not override font size in status screen 2023-04-09 21:36:43 -07:00
Joel Spadin
064aff6bc0 fix(behaviors): Fix use after free in sticky key
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.
2023-04-09 20:17:40 -07:00
Peter Johanson
374104dec6 fix(underglow): Move to spi3 for underglow bus.
* Workaround Zephyr bug for Nordic SPI(M) driver after the
  pinctrl refactor by using spi3 peripheral for the SPI bus for
  the WS2812 led_strip driver.
2023-04-09 14:41:00 -07:00
Joel Spadin
b31b42018a fix: Remove deprecated labels from zmk_uno 2023-04-08 15:37:48 -07:00
Cem Aksoylar
7434a6b99b fix(shields): Fix nice!view for deep sleep 2023-04-08 00:41:19 -07:00
Hooky
9dcc3ac375
fix(shields): Fixup nice!view adapter pinctrl props.
`pinctrl-0` setting missing `<>`.
2023-04-07 06:53:10 -07:00
Peter Johanson
313ed6adb6 fix(display): Tweak EPD driver init/blanking.
Ensure we only clear the display when turning blanking off the
first time, not every time, to avoid duplicate clears.
2023-04-05 22:55:38 -07:00
Peter Johanson
1493620bf7 refactor(boards): Move to pinctrl. 2023-04-05 22:55:38 -07:00
Peter Johanson
518f9a550f fix(underglow): Use DT_HAS_CHOSEN properly. 2023-04-05 22:55:38 -07:00
Peter Johanson
198daaf524 fix(shields): Don't try to disable xiao_i2c on Hummingbird. 2023-04-05 22:55:38 -07:00
Peter Johanson
c3d06b22c8 fix(core): Bump system work queue stack on RP2040. 2023-04-05 22:55:38 -07:00
Peter Johanson
a6ebdb7180 fix(kscan): Default wait between outputs on RP2040. 2023-04-05 22:55:38 -07:00
Peter Johanson
2f9bc2f1f7 fix(logging): Disable USB driver logging.
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.
2023-04-05 22:55:38 -07:00
Peter Johanson
31f664ffec fix(boards): Base config/overlay for rp2040 boards
Baseline config and overlay for the following:

* `rpi_pico`
* `adafruit_kb2040`
* `sparkfun_pro_micro_rp2040`
* `adafruit_qt_py_rp2040`
* `seeeduino_xiao_rp2040`
* `boardsource_blok`
* `01space_rp2040_042lcd`

Co-authored-by: Joel Spadin <joelspadin@gmail.com>
2023-04-05 22:55:38 -07:00
Peter Johanson
09ed79a867 refactor: Move away from deprecated label usages.
* 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.
2023-04-05 22:55:38 -07:00
Peter Johanson
062f94d014 refactor: Remove v1 logging vestiges. 2023-04-05 22:55:38 -07:00
Peter Johanson
e84b4299b5 refactor: Remove deprecated Kconfig override. 2023-04-05 22:55:38 -07:00
Peter Johanson
3a958c667f refactor: Move to zephyr/ include paths.
* Zephyr moved to properly namespaced headers, so major "rip
  the bandaid" commit to move us to those everywhere.
2023-04-05 22:55:38 -07:00
Peter Johanson
35a1c5a3d4 refactor(behaviors): Rename reset behavior.
* Upstream now has a node w/ label `reset` on many boards, so
  renaming our reset behavior node label to `sys_reset`.
2023-04-05 22:55:38 -07:00
Peter Johanson
4f2f9db1d4 refactor(ble): New callback API for pairing complete. 2023-04-05 22:55:38 -07:00
Peter Johanson
d513dc1766 refactor: Move to new PM API. 2023-04-05 22:55:38 -07:00
Peter Johanson
243a227ff9 refactor: Move to LISTIFY/DT_FOREACH_PROP_ELEM macros. 2023-04-05 22:55:38 -07:00
Peter Johanson
69a4c3200d refactor(display): Updates for LVGL v8.x changes.
* 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.
2023-04-05 22:55:38 -07:00
Peter Johanson
168b32b828 refactor: Move to Zephyr 3.2 branch. 2023-04-05 22:55:38 -07:00
Peter Johanson
ae8299edb3 fix(boards): Move the CDC ACM node under the USBD.
* Ferris board's CDC ACM node was accidentally nested under the wrong
  node, causing USB logging builds to fail with cryptic error.
2023-03-25 13:14:12 -07:00
prdktntwcklr
cd64c59b39 fix(tests): ignore line endings 2023-03-21 17:44:49 -07:00
chrissicool
56299ba5dc
fix(boards): Disable CDC by default for CiZ
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.
2023-03-21 20:42:11 -04:00
Robert U
6cb42a8060
feat(behaviors): On-release option for positional-hold-taps 2023-03-12 12:24:00 -04:00
Xudong Zheng
8904407983 feat(underglow): use float for HSB to RGB calculation 2023-02-25 01:44:00 -05:00
Cem Aksoylar
1d65661efa fix(keymap): Fix tidbit keymap 2023-02-25 00:53:18 -05:00
Cem Aksoylar
3eee53676f fix(shields): Fix missing binding in eek keymap 2023-02-21 23:49:56 -05:00
Cem Aksoylar
0c0ebda65b fix(keymap): Fix default Ergodash keymap 2023-02-21 23:49:10 -05:00
Cem Aksoylar
5d22d76d72 fix(shields): Fix Kyria five column transforms 2023-02-21 23:47:10 -05:00
Cem Aksoylar
72624a41fa fix(shields): Add missing col-offsets for extra transforms 2023-02-21 23:47:10 -05:00
Omri Kaplan
c065d451cb
fix(shields): Fix keycodes that differ from the default keymap (#1590)
- 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
2023-02-07 20:29:38 -05:00
Martí Bolívar
9d1070a140 chore(build): update west.yml syntax
West has supported a 'name-blocklist' replacement for 'name-blacklist'
since v0.9.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-02-01 11:36:55 -05:00
zhiayang
41830ce19a fix formatting 2023-01-19 22:30:27 -05:00
zhiayang
fbdb24c6fe fix(driver): Fix potentially buggy read/write routines for max7318 driver 2023-01-19 22:30:27 -05:00
Peter Johanson
a82a0ec496 feat(shields): Add splitkb.com Aurora Lily58. 2023-01-06 20:10:53 -06:00
Peter Johanson
c23443a086 feat(docs): Generate new shield interconnect docs.
* 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>
2022-12-23 02:41:35 -06:00
byran.tech
14324390e8
fix(boards): replace nRF3840 with nRF5340 2022-12-22 20:42:57 -06:00
Ladislav Benc
58f8c97d3c
feat(shields): Add a Reviung5 shield
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-12-20 20:49:17 -06:00
Nick Coutsos
6e99a48696 fix(behaviors): Mark sticky key release-after-ms required 2022-12-20 20:38:26 -06:00
Joel Spadin
3eb06f137b feat: Add global macro timing configs
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.
2022-12-20 20:34:25 -06:00
Cem Aksoylar
5cbe572f7d fix(display): Re-default to blank on idle for OLEDs 2022-12-18 16:34:27 -06:00
Cem Aksoylar
ebb4cb76d3 fix(boards): Add Zen .conf file for setup script 2022-12-16 17:41:39 -06:00
Darryldh
4a3e783f32
feat(boards): Add Corne-ish zen v2
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-12-16 10:57:25 -06:00
Jerome Olivier
984b16e03b
feat(boards): Add preonic_rev3 board. 2022-12-16 10:52:26 -06:00
hyx0329
4faf6eba97 feat(boards): Add battery sensor for Makerdiary M60 keyboard
Signed-off-by: hyx0329 <hyx0329@163.com>
2022-12-14 12:38:03 -06:00
Peter Johanson
1425d0f2d9 fix(shields): Fix col-offset for splitkb.com corne
Same column offset for both transforms, since we use the same
pins for both, just apply a different transform.

Fixes: 1570
2022-12-13 20:46:26 -06:00
JW2586
617136b45e
feat(shields): Added Waterfowl shield 2022-12-10 23:51:41 -05:00
Joel Spadin
01500b085e
fix(boards): Add nRF5340 DK metadata file (#1579) 2022-12-10 22:21:54 -06:00
Kyle McCreery
70aa4fa824
feat(boards): Add PillBug board, blackpill interconnect.
* 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>
2022-12-10 22:01:37 -06:00
Joel Spadin
36ee1f4e0a fix(boards): Fix nRF5340 DK issues
- Fixed a stack overflow when enabling Bluetooth.
- Increased the I2C buffer size to support displays.
2022-12-10 21:56:14 -06:00
Pavlos Vinieratos
2b235ae281
fix(boards): Add encoder config to bdn9_rev2.conf 2022-12-10 19:33:50 -06:00
Peter Johanson
63b29ccd32 feat(shields): Add ZMK Uno shield.
* Support underglow, backlight, display, encoder, etc.
2022-12-10 17:40:57 -06:00
Peter Johanson
12329b388e feat(boards): Add Arduino Uno interconnect, nrf52840dk config. 2022-12-10 17:40:57 -06:00
Cem Aksoylar
58eb7a3305 feat(display): Add config to show battery level in percentage 2022-12-10 17:08:37 -06:00
Joel Spadin
593db85378 feat(boards): Add support for nRF5340 DK
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.
2022-12-08 01:00:48 -06:00
Albert Y
6550c043c4
refactor: Update cradio keymap with better indentation and additional features 2022-11-25 23:02:28 -06:00
Xudong Zheng
c7fdce863a fix(usb): add USB_DC_CLEAR_HALT to supported states
See https://manpages.debian.org/testing/linux-manual-4.9/usb_clear_halt.9 for
information on halted USB endpoints
2022-11-17 22:52:32 -06:00
Peter Johanson
9f90dd1fc7 fix(boards): Fix XIAO BLE voltage divider config.
* Use proper resistor value for the `output-ohms` property.
2022-11-17 22:46:12 -06:00
jhorology
768fc4a5e5 fix: HID report descriptor 2022-11-10 22:15:06 -06:00
Peter Johanson
a9048956b5 feat(shields): Add splitkb.com Aurora Corne. 2022-11-10 21:05:26 -06:00
Peter Johanson
2364960f84 feat(shields): Add splitkb.com Aurora Sweep. 2022-11-04 12:13:16 -05:00
Okke Formsma
a61eac9139
fix(behaviors): make tap dances work on a combo
* Tap dance event handler goes after combos
* Add test
2022-11-01 15:13:19 -05:00
HookyQR
d393247e15
fix(display): Set bits per pixel and color depth on n!v 2022-10-30 19:50:21 -05:00
Jay Greco
41fdd07315 feat(boards): Add nullbits SNAP shield 2022-10-25 07:50:56 -05:00
Nick Winans
d3d5b8eb8a
fix(displays): Adjust alignment and spacing
* Adjust alignment and spacing
* Fix char array lengths
2022-10-21 23:10:55 -04:00
ebastler
c9eb63199a
feat(keymaps): add NUHS/NUBS alias for Non-US-Backslash/Non-US-Hash 2022-10-17 21:48:19 -04:00
Robert U
ef2e6e9156
feat(behaviors): Add mod-morph keep-mods
* 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>
2022-10-14 20:40:28 -05:00
Nick Winans
18b8b9b3a5
fix(shields): Disable idle blanking on nice!view 2022-10-14 11:39:47 -05:00
Peter Johanson
605d88f266 feat(ble): Default a few configs for DIS GATT svc.
Default values for DIS GATT characteristics for:

* Vendor ID
* Product ID
* Manufacturer
* Model
2022-10-05 11:34:37 -04:00
Pavel Glushkov
1e25ee77d2
fear(boards): Add nrfmicro_13_52833 board
* Add nrfmicro_13_52833 board definition.

Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-10-02 22:01:55 -04:00
zhiayang
cc3d5529fd
feat(drivers): Driver for MAX7318 GPIO expander (#1295)
Add driver for max7318 i2c gpio expander

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-09-29 21:22:01 -04:00
Nick Winans
3d3c45bc80
feature(shields): Add nice!view
* Use two shield system, nice_view, and nice_view_adapter
* Build system fixes for interconnect use.
2022-09-29 21:11:26 -04:00
Peter Johanson
9782518397 feature(drivers): Option for read wait on matrix.
* Add a new Kconfig option, `ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS`
  to delay reading inputs after setting an output active.
2022-09-29 01:06:54 -04:00
ReFil
b655554b03
refactor(boards): CRBN and Planck keymap fixes
* 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>
2022-09-22 15:14:09 -04:00