Commit graph

70 commits

Author SHA1 Message Date
innovaker c402e953f6 feat(hid): Make keypad report boot friendly
Add missing byte to make keypad report boot friendly.
2020-10-27 22:55:40 +00:00
innovaker 8ce7d8de01 refactor(hid): Refactor consumer report to a configurable size 2020-10-27 22:36:26 +00:00
innovaker f4596fc784 refactor(hid): Refactor keypad report to use a configurable integer array
Replace NKRO bit array with configurable integer (DV) array.
2020-10-27 22:36:26 +00:00
Pete Johanson f35d9f8f69
Merge pull request #258 from megamind4089/dev/ext-power-behavior
New behavior for ext power control
2020-10-13 00:01:32 -04:00
Pete Johanson 6d9aa4f5ea fix: Updated copyright headers to single author file. 2020-10-12 13:03:10 -04:00
Mega Mind 5d1c083959 Added toggle and removed a param 2020-10-12 23:42:01 +08:00
Mega Mind b5e1c8a7ad New behavior for ext power control 2020-10-12 23:42:01 +08:00
Okke Formsma d38740cebf
Add timestamps to position and behavior events (#147)
* Add timestamps to position events and behaviors.

- Take original event timestamps into consideration so nested tap-holds have proper timing.
- Add position and timestamp to keycode state changed event so the one-shot behavior can properly identify other keypresses and timings.
- Add timestamp to position events received from peripheral

* reduce number of arguments to behaviors
2020-10-10 17:32:53 -04:00
Mega Mind 4d81b10ba7 Added driver to control the external power output
This PR adds support to control the external power output from controllers like nice!nano, nRFMicro etc

I have implemented based on my understanding of Pete suggestion on this feature.

Testing done:

    Tested by enabling and disabling the ext_power from application and verified
    Verified the application does not crash with boards that does not have ext_power support
    Note:
    I did not test this in nice!nano since I don't have the boards. Will get help from others once the behavior PR is up

Next Steps:

    Create a behavior PR to control enable/disable ext_power
2020-10-10 08:11:46 +08:00
Pete Johanson a7496ab064 feat(power): Initial deep sleep work.
* New ZMK_SLEEP Kconfig symbol to enable the functionality.
* Switch to PORT events that allows wake from deep sleep.
* Initial basic power management policy, with idle ms,
  and ignoring deep sleep if we detect a USB connection.
2020-10-06 17:24:36 -04:00
Pete Johanson bbf5a5905a refactor(usb): Report USB status w/o HID output. 2020-10-04 21:56:09 -04:00
Dev c68e3d3e42 Add missing licensing header
Fixes #205
2020-10-02 13:14:31 +05:30
Pete Johanson 307a8d09db feat(usb): Function to access latest USB status.
* To be leveraged by upcoming power
  management work.
2020-10-01 17:18:01 -04:00
Pete Johanson 191a2d755a chore: clang-format the codebase.
* Use the LLVM style
* Override indent width (8) and column limit (100)
* Fixes #142.
2020-09-14 00:10:34 -04:00
Pete Johanson 6c8b0b53f0 refactor(bluetooth): More concise names. 2020-09-13 22:33:31 -04:00
Pete Johanson 39f980a06d feat(bluetooth): Add back profiles, split fixes.
* Add back in profiles, not using Zephyr
  BT identity infrastructure.
* Restore additional `&bt` commands for profile
  operations.
* Fix for split pairing and subscriptions, since
  Zephyr persists subscriptions across connects.
* Remove keymap from peripheral builds, reduces
  firmware size, and avoids unneeded attempts
  to send HID data.
2020-09-13 22:33:29 -04:00
Pete Johanson fc0812bd2e fix(bluetooth): Remove identity, minimal bt.
* Simplify the `bt` behavior to one current command
  `BT_CLEAR_BONDS_CMD`.
* Simplify BLE code for split and non-split keyboards.
* Remove keymap processing from split peripheral side.
2020-09-13 22:33:05 -04:00
Pete Johanson cf970efb98 feat(bluetooth): Proper bond management, identity support for non-splits
* Add `bt` behavior that can be used to perform certain actions,
  such as next/prev identity, reset identity, etc.
  NOTE: Multiple identities is only supported for non-split shields,
  due to missing Zephyr identity functionality for dual
  central/peripheral devices.
* Proper bond reset tied to action, that honors peripheral bonds,
  so folks can reset and pair to other hosts, without breaking
  bonds between splt halves.
2020-09-13 22:33:05 -04:00
Pete Johanson 68e72f9275 fix: Switch to single AUTHORS file.* Closes #164 2020-09-10 10:24:23 -04:00
Pete Johanson 48a3729ffe
Merge pull request #146 from okke-formsma/hold-tap
Hold-Tap implementation
2020-09-02 13:55:26 -04:00
Okke Formsma c5ca664411 some fixes based on feedback 2020-09-02 15:26:06 +02:00
Okke Formsma c33931c72c Initial implementation of hold-tap 2020-09-01 19:41:08 +02:00
CrossR 6be07b5b24 Merge branch 'main' into CrossR/Sofle 2020-08-29 22:54:43 +01:00
Cody McGinnis f02fa01e9a fix(test): change the layout 2020-08-28 16:21:31 -04:00
CrossR d848034c81 Add keycodes properly. 2020-08-21 22:15:27 +01:00
Pete Johanson 805ea77005 feat(behaviors): Add &bootloader behavior.
* Allow reset behavior to have a type property.
* Add `bootloader` node that triggers DFU UF2
  bootloader mode using the AdaFruit nrf52
  bootloader.
2020-08-21 11:23:45 -04:00
Pete Johanson 0d3cfa8596
Merge pull request #99 from petejohanson/core/bluetooth-unpair-magic-combo
Add magic combo for unpairing BT devices on start.
2020-08-18 19:21:43 -04:00
Cody McGinnis 7facb6eee8 fix(keymap): move the toggle layer logic to keymap.c 2020-08-18 14:02:25 -04:00
Cody McGinnis a82f990d4c feat(keymap): allow users to toggle layers 2020-08-18 14:02:24 -04:00
Pete Johanson 4402e4fbc7 feeature(bt): Add "unpair combo" on startup.
* Especially for splits, we need the ability to
  unpair all paired devices as  sledgehammer
  if we need to "reset things", and doing so via
  keymaps isn't suitable.
* Allows shields to define a collection of key
  positions that if all held 2 seconds after
  startup, will unpair all existing pairs for the
  device.
2020-08-18 13:17:10 -04:00
Nick fbaeb95601 Add better default keymap for lily58 2020-08-02 20:46:56 -05:00
Pete Johanson f548f2a87c Initial stab at mod-tap improvements.
* Not working: Roll over + mod-tap with multiple
  mod-tap bindings!
2020-07-31 00:07:16 -04:00
Pete Johanson cf8c7856ff Add the ability to capture event and release later 2020-07-30 00:13:32 -04:00
Pete Johanson 2f1c3dd538 Remove unneeded macro. 2020-07-29 00:12:35 -04:00
Pete Johanson 05d7bd30f3
Merge pull request #66 from Nicell/keycodes/f-keys-prsc
Add F keys and a few other missing HID keycodes
2020-07-27 09:18:22 -04:00
Nick 885176e748 Add a few more keys 2020-07-26 22:31:11 -05:00
Nick 5bbd20b527 Add F keys and print screen 2020-07-26 22:23:26 -05:00
Pete Johanson 4e5a819f3a
Merge pull request #64 from Nicell/feature/rgb_underglow
Initial RGB Underglow implementation
2020-07-26 21:43:43 -04:00
Pete Johanson 5b862655b4 Whitespace fix. 2020-07-25 23:17:33 -04:00
Pete Johanson d80063ff51 Initial display support. 2020-07-25 23:10:40 -04:00
Nick 564f787280 Add suggested changes 2020-07-25 14:53:42 -05:00
Nick ca569c8143 Initial RGB Underglow implementation 2020-07-24 22:37:00 -05:00
Pete Johanson 34ff6190bd Initial behavior for key presses on encoder rotate 2020-07-22 14:54:18 -04:00
Pete Johanson 4d73938cb5 More sensor keymap work. 2020-07-22 10:10:04 -04:00
Pete Johanson adfa1b5443 Initial work on sensor bindings. 2020-07-22 02:13:52 -04:00
Pete Johanson eb0bf2337e More cleanup of BLE split code. 2020-07-17 22:43:40 -04:00
Pete Johanson be537d0656 Lots of work on split peripheral/central logic. 2020-07-17 22:43:40 -04:00
Pete Johanson a165db6358 Initial work on split central support. 2020-07-17 22:43:40 -04:00
Pete Johanson 3796f76c56 Initial exploration of split BLE service.
* Service for split peripheral to report
  position state to split central.
* Updated advertising info.
* Behavior for split BT until we have a proper
  event system.
2020-07-17 22:43:40 -04:00
Pete Johanson 7c5fb7adb5 Use SYS_INIT for BLE and USB init. 2020-07-07 10:20:23 -04:00