Joel Spadin
6d6efa32f5
refactor(kscan): Auto enable kscan drivers
...
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.
3 years ago
Peter Johanson
4df83a9c0d
refactor: Move away from deprecated PM callback.
3 years ago
Peter Johanson
53dae35710
refactor: Move to `k_work_delayable` API.
...
* Move to new `k_work_delayable` APIs introduced in Zephyr 2.6.
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.6.html#api-changes
3 years ago
Pete Johanson
2a69f31eb0
refactor(core): Move away from deprecated DT API.
...
* Move to `DEVICE_DT_INST_DEFINE` everywhere.
See: https://docs.zephyrproject.org/2.5.0/releases/release-notes-2.5.html#deprecated-in-this-release
PR: https://github.com/zmkfirmware/zmk/pull/736
3 years ago
Jay Greco
f3bb90f9e1
fix(kscan): Fix nibble demux scan errors on encoder row
...
+ Add a 1us sleep to let the column selection settle in order to avoid spurious keypresses when row capacitance is high (like on the encoder row)
4 years ago
innovaker
00ca0d2f1c
refactor(app): replace `struct device *` with `const struct device *`
...
Replaced with RegExp: /(?<!const )(struct device \*)/g
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
4 years ago
innovaker
1411092a7b
refactor(app): replace `driver_data` with `data`
...
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
4 years ago
innovaker
3d7376d2e5
refactor(app): replace `config_info` with `config`
...
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
4 years ago
innovaker
bac1f17cf6
refactor(app): replace Zephyr integer types with C99 integer types
...
u8_t → uint8_t
u16_t → uint16_t
u32_t → uint32_t
u64_t → uint64_t
s8_t → int8_t
s16_t → int16_t
s32_t → int32_t
s64_t → int64_t
Prerequisite for #223
See: https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.4.0
PR: #467
4 years ago
innovaker
8d9ae1fdf3
refactor: Align drivers with Zephyr file system conventions
...
PR: #400
4 years ago
Jay Greco
8a98212a02
Update demux kscan driver as per PR feedback
...
- Remove kscan_gpio_irq_callback
- Remove kscan_gpio_irq_callback_handler
- Remove irq_callbacks
+ Add TODO noting timer and sleep state interactions
4 years ago
Jay Greco
1522c91d73
Add new kscan_gpio_demux driver
...
+ zmk,kscan_gpio_demux is now a compatible kscan option
+ kscan_gpio_demux is based heavily off of the implementation of
kscan_gpio_matrix, modified to address cols using an n-to-1
demultiplexer chip instead of discrete IO
+ Added zmk,kscan_gpio_demux.yaml file
* modified CMakeLists to include new source files
4 years ago
Nuxiom
1c0c02e097
Reformatted according to clang-format lint
4 years ago
Nuxiom
78cb6c8b21
Fix kscan_gpio_irq_callback_handler_##n conditional macro
4 years ago
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.
4 years ago
Pete Johanson
9be566603e
feat(kscan): Use PORT events for kscan matrix interrupts
...
* Lower power usage compared to regular interrupts on nrf52.
4 years ago
Pete Johanson
e993378b2a
chore: Fix some accidental formatting issues.
4 years ago
Jason Chestnut
c2a861c0e6
Modify preprocessor directives to use basic #if !defined() rather than Zephyr macros where appropriate.
4 years ago
jason
9392c4f9ff
Fix preprocessor flag issues for pull request.
4 years ago
Jason Chestnut
cca8337f05
Add support to GPIO matrix driver for matrix polling, rather than interrupt-based IO.
...
- Add ZMK_KSCAN_MATRIX_POLLING config flag to Kconfig
- Update matrix driver code to use the above flag to conditionally add the handling code for polling operations.
4 years ago
Jason Chestnut
b1dce208f8
Add matrix polling logic to matrix GPIO driver.
4 years ago
Jason Chestnut
9668305621
Restore original matrix driver to correct implementation errors.
4 years ago
Jason Chestnut
5c4705d465
Add new matrix scan flag and implementation in the gpio matrix driver.
4 years ago
Pete Johanson
191a2d755a
chore: clang-format the codebase.
...
* Use the LLVM style
* Override indent width (8) and column limit (100)
* Fixes #142 .
4 years ago
Pete Johanson
68e72f9275
fix: Switch to single AUTHORS file.* Closes #164
4 years ago
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.
4 years ago
Pete Johanson
ac802bedb1
Bump delay in scanning while held to 5ms.
4 years ago
Pete Johanson
e448f2d32b
kscan: matrix: Remove verbose logging in read.
5 years ago
Pete Johanson
497049ff68
Detect additional key presses on the same output.
...
* Interrupts won't follow on additional keys
pressed on an already "held" output pin,
so queue additional reads while any keys are held.
5 years ago
Pete Johanson
c32c25d3c0
Properly allocate input/output arrays statically.
5 years ago
Pete Johanson
d35a95c7af
Initial working Clueboard California Macropad w/ proton-c fixes
...
* Basic Clueboard Californai Macropad shield definition.
* New "direct" KSCAN driver that supports non-matrix direct
wiring for switches, needed for macropad that doesn't have
a matrix at all.
* Some renames for existing KSCAN GPIO driver to make the implied
"matrix" part explicit.
5 years ago
Pete Johanson
297e457dd5
Fix remaining Apache header lines.
5 years ago
Pete Johanson
38f1dbd984
Move Zephyr app into subdirectory.
5 years ago
Pete Johanson
432adf5b60
Fixes for multiple GPIO kscan devices as expected.
5 years ago
Pete Johanson
72ad47e027
Initial import of GPIO kscan driver into ZMK.
5 years ago