Okke Formsma
c01243d1c6
fix(logging): remove unnecessary newline
4 years ago
Pete Johanson
0f9fff7554
Fix the label for the GPIO kscan driver.
4 years ago
jrhrsmit
e40ca1eb7c
fix(power): Add support for capacitors on ADC for BVD
...
Add a little delay so any capacitors connected to the ADC for the BVD can charge up when using power_gpios
Co-authored-by: Jasper Smit <jrhrsmit@gmail.com>
4 years ago
Pete Johanson
6c7ab0ce53
refactor(kscan): Fix polling of GPIO matrices.
...
* Add easier macros for conditional polling/interrupt code.
* Properly continue polling on intervals, without extra
enable/disable code for pins that is superfluous when not trying to
deal with interupts firing.
* Fix to allow multiple GPIO drivers when doing splits w/ IO expanders
4 years ago
Pete Johanson
2f352788c1
refactor(kscan): Remove explicit default n from kscan configs.
...
* Actually allow defaulting yes in other places.
4 years ago
innovaker
61893e453b
refactor(app): format with prettier ( #563 )
...
prettier --write .
PR: #563
4 years ago
innovaker
842aa5a842
refactor: replace filename hyphens with underscores
...
Aligns *.h and *.c to underscore naming convention.
These were kept (with warnings) for backwards compatibility with external boards/shields:
- kscan-mock.h
- matrix-transform.h
They should be removed in the future.
PR: #523
4 years ago
innovaker
f7d9d52221
refactor(app): replace `void` with `const struct device *dev` in ISR CBs
...
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
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
Pete Johanson
e6a27b15c1
fix(kscan): Fix building kscan for tests.
4 years ago
Pete Johanson
ca38894e07
fix(drivers): Remove conditional from directories.
4 years ago
innovaker
8d9ae1fdf3
refactor: Align drivers with Zephyr file system conventions
...
PR: #400
4 years ago
Pete Johanson
e0fede4aa5
refactor(kscan): Use PORT events for direct driver
...
* Switch interrupt configuration so nRF52 uses
PORT events for lower power use, and wake
from deep sleep.
* Closes #272
4 years ago
4pplet
924a598920
Updated function calls with missing reference. GPIO missing.
...
Updated function calls with missing reference. GPIO missing.
To my understanding:
DT_INST_GPIO_PIN() should be called instead if DT_INST_PIN()
DT_INST_GPIO_FLAGS() should be called instead if DT_INST_GPIO_FLAGS()
Current implementation does not compile when using control pin.
4 years ago
innovaker
67a6646cd7
chore: add copyright to core Kconfig
4 years ago
innovaker
1c8321566a
fix(drivers): rename module.yaml to module.yml
...
module.yaml is not a valid module filename.
See Zephyr `scripts/zephyr_module.py`
4 years ago
Nick
8779563896
fix(bvd): Add SENSOR_CHAN_ALL support
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
Nick
a008731103
Implement Kconfig and enhance error checks
4 years ago
Nick
63007fb6c1
fix: clang-format
4 years ago
Nick
adb07926b1
Remove newlib dep
4 years ago
Nick
a67a8cd3b8
Check if fetch channel is supported
4 years ago
Nick
6047415b1c
Fix build for boards without voltage divider
4 years ago
Nick
162c6b77db
clang-format and add missing defconfig values
4 years ago
Nick
3082455aec
Refactor driver to use Sensor API
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
Joel Spadin
4121b07f7f
fix(kscan): fix direct GPIO when using interrupts
...
Fixed initializing interrupts for direct GPIO when
CONFIG_ZMK_KSCAN_DIRECT_POLLING is not enabled. IS_ENABLED() is needed to map
the possibly-undefined value to 0 or 1 so COND_CODE_0() and COND_CODE_1() work.
4 years ago
Joel Spadin
f6f8abe055
fix(ec11): allow more than one encoder
...
Fixes "device.h:101:11: error: redefinition of '__device_ec11'" in firmware that
has more than one encoder.
4 years ago
Pete Johanson
028dfae92e
chore: Fix remaining formatting issues.
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
Jason Chestnut
53425aa3c4
Rename kscan direct wired driver polling kscan flag in preparationfor addition of new matrix driver flag that enables polling.
4 years ago
Jason Chestnut
31af9646e6
Adding kconfig flag for enabling matrix polling (vs interrupts) on the matrix gpio driver.
4 years ago
Nick
f5909f9c26
fix(clang-format)
4 years ago
Nick
844f2c7674
Voltage divider driver initial implementation
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
01db53b46a
fix(kscan): Avoid sending duplicate kscan events.
4 years ago