Joel Spadin
f0b20c1c93
feat(boards): Add nRF52 high voltage DC/DC config
...
Added a Kconfig option to enable SOC_DCDC_NRF52X_HV for nice_nano_v2
and mikoto. According to Nordic's documentation, the DC/DC regulator is
more efficient than the LDO regulator, so this is enabled by default.
The following boards do not support this mode and were not changed:
- nice_nano
- nice60
- nrfmicro_11, nrfmicro_13
- nrf52840_m2
- bluemicro840
I could not find schematics to confirm whether the following boards
support this mode:
- bt60_v1, bt60_v2
- bt65_v1
- bt75_v1
- corneish_zen_v1, corneish_zen_v2
- pillbug
- puchi_ble_v1
- s40nc
2024-05-13 14:14:50 -07:00
Horu
7d1f84e3eb
chore: fix typos in various places
2024-05-13 16:47:33 -04:00
ReFil
2423136788
fix(boards): Fix pulls on ZMK uno toggle switch
...
The devicetree pulls always add on to the extra pulls configured by toggle mode, so these should not have pulls defined in the devicetree. Saved ~200uA avg on another board with a 3t toggle switch
2024-05-03 06:55:43 -07:00
Peter Johanson
af908826cd
fix: Initialize sideband kscan in APPLICATION.
...
* In order to be sure the rest of the system is fully ready before
intializing, because init may result in immediate events being
triggered when used with toggle direct kscan inner devices.
2024-05-01 11:35:54 -07:00
German Gutierrez
d1ad34761a
fix: shortening keymap_soft_off behavior node
...
* Shorten the soft off node in order for it to work across splits.
2024-04-29 12:22:40 -04:00
Jarryd Tilbrook
0d3a4b7bbb
fix(underglow): Correctly set underglow state
...
This fixes a bug introduced in #2244
2024-04-25 07:26:26 -07:00
Pablo Martínez
4d566853af
fix(rgb): auto-off logic
2024-04-25 04:55:42 -04:00
Sadek Baroudi
f4a070aacf
fix(boards): nrf boards missing SPI in pinctrl and dtsi, requiring users to manually define in their shield definitions if they wanted to use SPI
2024-04-25 00:54:44 -07:00
Peter Johanson
16e92cf665
fix(behaviors): Add multiple soft-off instances properly.
...
* Properly pass the node id for the unique
soft-off behavior instance when defining it.
2024-04-17 23:53:12 -07:00
Keeley Hoek
e22bc7620c
fix(hid): Correct off-by-one buffer overflow with NKRO
2024-04-09 23:20:20 -07:00
Xudong Zheng
849eca7228
refactor(underglow): fix uninitialized variable warning
2024-04-09 15:57:34 -07:00
Tobias Arndt
fe509c466f
fix(kscan): Enable charlieplex interrupts for single compatible device
...
Fixes #2201
2024-03-30 19:13:39 -07:00
Peter Johanson
fff1cbecdc
fix: Add wakeup-source; to kscan nodes for ZMK_SLEEP.
...
* ZMK_SLEEP also enables PM_DEVICE, so be sure to mark kscan
nodes as wakeup sources so they can wake keyboards from sleep.
2024-03-29 12:31:43 -07:00
Peter Johanson
29c0cdb3ab
fix(shields): Fix for direct use with ZMK Uno split.
2024-03-27 20:59:26 -07:00
Peter Johanson
7e7110d85f
fix(pm): Fixes for dedicated on/off on peripherals.
...
* Add new flag to differentiate soft off on peripherals that
is invoked by split GATT svc and dedicated additional ones
tied to GPIO pin.
2024-03-27 20:59:26 -07:00
Peter Johanson
41d81801ed
fix(pm): Use Zephyr created device slots.
...
* Avoid overwriting random memory by using
iterable section created by Zephyr PM.
2024-03-27 20:59:26 -07:00
Peter Johanson
d0e0ecb4e3
refactor: Use kscan directly to wake when we can.
...
* When adding a dedicated GPIO pin for soft off/on, use the direct
kscan as the waker, instead of adding an additional node.
2024-03-27 20:59:26 -07:00
Peter Johanson
2df6dcd973
feat(behaviors): More logging in soft off.
2024-03-27 20:59:26 -07:00
Peter Johanson
bb94a7aafe
fix: Fixes for building soft off without deep sleep.
2024-03-27 20:59:26 -07:00
Peter Johanson
8d54e287f0
fix: Adjustments for Zephyr 3.5.
2024-03-27 20:59:26 -07:00
Peter Johanson
bd21f41412
refactor: Fixes for review feedback.
2024-03-27 20:59:26 -07:00
Peter Johanson
5d960a758f
fix: Cleanups of sideband and direct kscan from review.
...
* Add dedicated init priority for the sideband kscan.
* Refactor sideband code for clarity.
* Tweaks to direct kscan for clarity.
* Make sideband behavior row optional for brevity.
* Allow overriding ZMK Uno sideband behaviors.
2024-03-27 20:59:26 -07:00
Peter Johanson
4198fac90f
fix(pm): Fix deep sleep with sideband behaviors.
...
* Properly implement the PM hook needed for sideband behavior
kscan device to have wakeup source enabled on it.
2024-03-27 20:59:26 -07:00
Peter Johanson
09111f1cf3
fix: Sleep after clearing endpoints to wait for send.
...
* Add a small sleep to allow other threads to send data for the
endpoint clearing before sleep.
2024-03-27 20:59:26 -07:00
Peter Johanson
c3144055e8
refactor(boards): Move ZMK Uno 1P3T slider to sideband
...
* Invoke output selection from the slider on the ZMK Uno via
sideband behavior setup, to simplify keymap.
2024-03-27 20:59:26 -07:00
Peter Johanson
a0ad1d4c94
refactor: Add kscan sideband behavior driver
...
* Instead of gpio key behavior trigger, add new kscan driver that
decorates/wraps a given kscan driver and will invoke basic system
behavior assigned to a given row + column, without the need for keymap
mapping in the matrix transform, bypassing keymaps entirely.
2024-03-27 20:59:26 -07:00
Peter Johanson
e78b25a445
feat(kscan): Direct kscan driver can use gpio-keys.
...
* Allow specifying direct kscan driver pins using gpio-key list
as an alternative.
2024-03-27 20:59:26 -07:00
Pete Johanson
933fdcd364
refactor(pm): Remove scanned behavior trigger.
...
* Remove the painful scanned behavior trigger for now, future enhancement
will restore this high level functionality using kscan directly.
2024-03-27 20:59:26 -07:00
Pete Johanson
5ebe924e94
chore: Various soft-off review fixes
...
* Code style to avoid goto.
* Enable pm.c compilation via dedicated Kconfig flag.
* Comment wakeup trigger PM behavior.
2024-03-27 20:59:26 -07:00
Peter Johanson
fceb0351a5
refactor: Fixes for soft-off based on review.
...
* Better naming for gpio-key behavior triggers.
* Tweaks to scanned behavior trigger to avoid bad semaphore use,
and reduce chance of issues with slowly scanned matrixes.
* Various code cleanups of style issues.
2024-03-27 20:59:26 -07:00
Peter Johanson
e78249ee06
fix(bt): Fix BT tests after soft off work.
...
* Move to explicit enable of `ZMK_PM_SOFT_OFF` to turn
on the feature and use the behaviors, which matches
how other features work, and helps with split and
testing schemes.
2024-03-27 20:59:26 -07:00
Peter Johanson
0d4d4fb2b5
feat(pm): Clear HID data before soft off.
...
* Make sure the connected host has no held HID usages before we sleep.
2024-03-27 20:59:26 -07:00
Peter Johanson
860e53b33a
refactor: Promote new endpoints API
...
* Add ability for external callers to clear the current endpoint.
2024-03-27 20:59:26 -07:00
Peter Johanson
d3fffb9e89
feat(shields): Add soft-off to the nrf52840dk ZMK Uno
...
* Use Button 1 for soft off on the nrf52840 when using the ZMK Uno
shield.
2024-03-27 20:59:26 -07:00
Peter Johanson
b19df0cbf0
feat(behaviors): Add soft off behavior.
...
* New soft-off behavior that can be used to force the device
into soft-off state with only certain configured wakeup
devices.
2024-03-27 20:59:26 -07:00
Peter Johanson
738c3c0e3b
feat(kscan): Add PM support to GPIO kscan drivers.
...
* Add PM device hook to the kscan direct & matrix drivers.
2024-03-27 20:59:26 -07:00
Peter Johanson
adb3a13dc5
feat: Add soft on/off support.
...
Initial work on a soft on/off support for ZMK. Triggering soft off
puts the device into deep sleep with only a specific GPIO pin
configured to wake the device, avoiding waking from other key
presses in the matrix like the normal deep sleep.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-03-27 20:59:26 -07:00
Thomas Huber
58ccc5970d
fix(build): Modify function return type
...
Change return type of `sticky_key_timeout` function to `void` given it
does not return any value to remove compiler warnings.
2024-03-27 14:52:42 -07:00
Peter Johanson
44358798d3
feat: Add ability to fetch battery voltage.
...
* To be able to use the Zephyr `voltage-divider` driver,
add a mode for fetching raw voltage from the sensor
and do state of charge calculation outside of the driver.
2024-03-24 13:28:55 -07:00
Peter Johanson
3a3eed2960
fix: Add settings reset on start init priority.
...
* Add a dedicated settings reset on start init priority and default
it to lower priority (high number) than default FLASH_INIT_PRIORITY
to be sure flash is initialized before we open the area.
2024-03-20 11:18:43 -07:00
Theo Lemay
ce743f2b35
chore: fix whitespace
2024-03-18 10:30:14 -07:00
Theo Lemay
af7e4198ae
chore: remove label in test
2024-03-18 10:30:14 -07:00
Theo Lemay
94d9d837e3
refactor: extract duplicate logic
2024-03-18 10:30:14 -07:00
Theo Lemay
341534aa15
feat(behaviors): lazy sticky keys
2024-03-18 10:30:14 -07:00
Pablo
8929355ac0
fix(keymap): Replace some keypad keycodes
...
* Change KP_MULTIPLY to ASTRK in defaults keymap
2024-03-18 13:19:27 -04:00
honorless
6f2e19ff88
refactor: replace quick_tap_ms with quick-tap-ms
...
* The underscore form of this property is deprecated.
2024-03-18 10:15:50 -07:00
honorless
3a38979684
refactor: replace tapping_term_ms with tapping-term-ms
...
* The underscore form of this property is deprecated.
2024-03-18 10:15:50 -07:00
Hans Kruse
c6e0551fb0
fix(hid): Fix typo in HID usage alias
2024-03-18 13:06:09 -04:00
ReFil
388ad71385
feat(build): Explicit missing keymap node error
...
* Explicit error if zmk,keymap not set
* Document keymap error
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-03-18 12:54:47 -04:00
Joel Spadin
a77288f527
fix: Update settings reset for Zephyr 3.5
2024-03-18 09:48:19 -07:00
Joel Spadin
1dfcfc7d3f
feat(shields): Make settings_reset shield reset all settings
...
Added a new CONFIG_ZMK_SETTINGS_RESET_ON_START option which enables init
code to call zmk_settings_erase(), and changed the settings_reset shield
to use it instead of CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START, so it now
resets all settings instead of just clearing BLE bonds.
CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START is left in place for now in case
someone still needs it. It may be replaced in the future once we find a
better way to repair a broken split connection.
2024-03-18 09:48:19 -07:00
Joel Spadin
610a806c84
feat: Add function to erase all settings
...
Added a zmk_settings_erase() function to clear all saved settings. This
does not go through Zephyr's settings subsystem, but instead directly
clears the data from the setting storage backend, so a reboot is needed
for it to take effect.
2024-03-18 09:48:19 -07:00
Peter Johanson
2adaa00d10
fix(build): Properly board revision keymaps.
...
* Handle board keymap location for boards with Zephyr
board revisions included.
* Includes bare non-revision file and a revision specific keymap
in case newer revision changes the layout/key positions.
2024-03-08 10:58:10 -08:00
Theo Lemay
c9c620d19f
fix: inline initialise
2024-02-20 00:25:53 -08:00
Theo Lemay
8b20874c99
chore: remove label in test
2024-02-20 00:25:53 -08:00
Theo Lemay
c007d60357
feat(behaviors): hold while undecided
2024-02-20 00:25:53 -08:00
Xudong Zheng
104c73d303
refactor: address transport switch enumeration warning
...
When building without USB or Bluetooth, the compiler emits a warning due to
ZMK_TRANSPORT_USB or ZMK_TRANSPORT_BLE not being handled.
2024-02-19 21:41:52 -08:00
Seth Milliken
b44ec381f6
feat(boards): add encoder support to planck
2024-02-19 17:01:10 -08:00
honorless
ccf0380179
refactor: remove redundant Kconfig defaults
...
bool symbols implicitly default to n.
2024-02-19 16:39:31 -08:00
ton-im
c082f8d802
fix(boards): Add ext power init delay for nrfMicro
...
* Address issues with OLED init occurring before display is powered.
2024-02-19 19:32:12 -05:00
zhiayang
a9ae6796a0
fix(display): Proper initial display of battery status
...
* fix initial display of battery status on displays, and also fix a null deref
2024-02-19 19:15:19 -05:00
Peter Johanson
fda6a5f185
fix(boards): Tweaks for Ferris rev0.2 for Zephyr.
...
* Enable missing clock and set up USB pinctrl.
2024-02-17 21:57:21 -08:00
ctranstrum
0f49fa9ae4
fix(behavior): Proper init priority for ext_power.
2024-02-14 20:29:19 -05:00
honorless
40adb3858d
refactor(boards): remove superfluous conf settings
2024-02-10 16:15:09 -08:00
honorless
cdcf4ebfb6
feat(boards): allow use of blackpill_f401cc
2024-02-10 16:15:09 -08:00
Peter Johanson
50a303b8bb
fix(pm): Restore sleep suspension of devices.
...
* After the move to `sys_poweroff`, restore the behavior of
suspending devices before entering sleep state.
2024-02-09 14:32:46 -08:00
Peter Johanson
1d83f279cd
fix(pm): Tweaks for deep sleep/PM.
...
* Restore enabling of PM_DEVICE, make ZMK_SLEEP work with
the ZMK Uno shield on nrf52840dk_nrf52840 board.
2024-02-09 14:32:46 -08:00
Peter Johanson
4bcecd98f8
fix(display): Tweaks to memory Kconfig settings.
...
* Don't default heap mempool by default now that there's a dedicated
LVGL mempool
* Set proper defaults for CiZ display hardware/custom screen.
* Double the dedicated display thread stack size for CiZ.
2024-02-09 14:32:46 -08:00
Peter Johanson
2d6c9f797c
refactor(display): Move to proper SPI ready API.
2024-02-09 14:32:46 -08:00
Peter Johanson
cd6f8a680c
fix(ble): Update security test for changes in 3.5.
2024-02-09 14:32:46 -08:00
Peter Johanson
b2a0a357e1
fix(display): Set a default mem size for built-in
...
* Set a reasonable default LVGL mem pool size for our built-in
status screen.
2024-02-09 14:32:46 -08:00
Peter Johanson
d9c0ded402
fix(shields): Fix use of deprecated Zephyr header.
2024-02-09 14:32:46 -08:00
Peter Johanson
aeb5bed3d6
fix(kscan): Adjust charlieplex init level/priority.
2024-02-09 14:32:46 -08:00
Peter Johanson
a6c0399493
fix(bluetooth): Remove LLCP impl override.
2024-02-09 14:32:46 -08:00
Peter Johanson
324ada1d20
fix(boards): Remove unused pin settings.
...
* Remove unused pin settings that used deprecated
devicetree properties.
2024-02-09 14:32:46 -08:00
Peter Johanson
8e9b4fa57c
fix(boards): Make `&bootloader` work on nrf52 for now.
...
* Use `NRF_STORE_REBOOT_TYPE_GPREGRET` to get bootloader behavior
to work for now until retained bootmode is implemented.
2024-02-09 14:32:46 -08:00
Peter Johanson
3968d9febd
feat(boards): Make `west flash` work with new UF2 runner.
2024-02-09 14:32:46 -08:00
Peter Johanson
b3f1d769f0
fix(bt): Fixes for BLE test BSIM bits.
2024-02-09 14:32:46 -08:00
Peter Johanson
4fcbe3268a
fix(bt): Updated snapshots for BLE tests.
...
* Core Zephyr changes tweaked the output from the
BT stack for our unit tests.
2024-02-09 14:32:46 -08:00
Peter Johanson
413820fc7f
fix(shields): LVGL fixes for nice!view screen
...
* Bump the LVGL mem pool size needed for custom screen.
* Fixes for LVGL drawing/label usage.
2024-02-09 14:32:46 -08:00
Peter Johanson
802881b625
fix(boards): Remove references to PINMUX Kconfig.
2024-02-09 14:32:46 -08:00
Peter Johanson
f4e6d70465
fix: Proper use of CONTAINER_OF with delayable work.
2024-02-09 14:32:46 -08:00
Peter Johanson
552347b8a4
fix(kscan): Adjust composite kscan priority
...
* Composite kscan needs a dedicated priority to be sure it is
initialized after the other kscan instances.
2024-02-09 14:32:46 -08:00
Peter Johanson
a81a2d37a8
refactor: Remove explicit blocklist item.
...
* `sof` is now not enabled by default as a west dep, so need to
add it to the blocklist ourselves.
2024-02-09 14:32:46 -08:00
Peter Johanson
98e3b8b435
refactor: Move to new sys_poweroff API.
...
* Move to new `sys_poweroff` API for our deep sleep functionality.
2024-02-09 14:32:46 -08:00
Peter Johanson
b6d9f3c911
fix(ble): Ensure large enough string for setting name.
...
* Fix warning related to potentially large number of profiles
causing overflow of allocated string for the setting name.
2024-02-09 14:32:46 -08:00
Peter Johanson
58413ca8c5
refactor(kscan): Clean up warning about shadowed local.
2024-02-09 14:32:46 -08:00
Peter Johanson
d6de8a3acc
refactor: Move to POST_KERNEL phase for behavior inits.
2024-02-09 14:32:46 -08:00
Peter Johanson
ba1a6c08ad
refactor: Return int from main function.
2024-02-09 14:32:46 -08:00
Peter Johanson
d06e90e713
fix: Fix syscalls generation setup.
2024-02-09 14:32:46 -08:00
Peter Johanson
bd9c71ab0a
fix(sensors): Avoid duplicate Kconfig/DTS name.
...
* Upstream added an equivalent fuel gauge driver, so namespace
our Kconfig symbol and DTS compatible for the MAX17048 driver.
2024-02-09 14:32:46 -08:00
Peter Johanson
0b5afbf9c0
refacter(bluetooth): Proper HCI header include.
2024-02-09 14:32:46 -08:00
Peter Johanson
fb99496a73
chore: Switch to 3.5 Zephyr version.
2024-02-09 14:32:46 -08:00
Peter Johanson
f7e7c9c10b
fix: Add missing include for k_work types.
2024-02-09 14:32:46 -08:00
Peter Johanson
bf4008da02
refactor: All SYS_INIT functions are void args.
2024-02-09 14:32:46 -08:00
Peter Johanson
f4fce9e158
refactor(display): Move new LVGL DPI Kconfig setting.
2024-02-09 14:32:46 -08:00
Cem Aksoylar
b8846cf635
refactor(display): Remove unused BAS includes
2024-02-06 01:09:07 -08:00
Cem Aksoylar
efbcd3c8f6
fix(boards): Disable ZMK_USB for peripherals
2024-02-06 01:09:07 -08:00
Cem Aksoylar
4b03fcb709
fix(boards): Add missing battery header include
2024-02-06 01:09:07 -08:00
Joel Spadin
c2299e2203
fix(shields): Fix deprecated encoder properties
...
Switched remaining shields over from resolution to steps.
2024-02-03 18:45:21 -06:00