summaryrefslogtreecommitdiff
path: root/app/drivers/zephyr
AgeCommit message (Collapse)Author
2021-10-26feat(kscan): Improve matrix debouncingJoel Spadin
Switched the GPIO matrix driver to debouncing using a simple integrator algorithm. Whenever a key is pressed, we now scan at a rate controlled by debounce-scan-period-ms (default 1 ms) until all keys are released, then return to either waiting for an interrupt or polling more slowly. The timers for key press and release can now be controlled separately, so debounce-period is deprecated in favor of debounce-press-ms and debounce-release-ms. Global Kconfig options ZMK_KSCAN_DEBOUNCE_PRESS_MS and ZMK_KSCAN_DEBOUNCE_RELEASE_MS are also added to make these easier to set. Added documentation for debouncing options.
2021-09-14feat(drivers): Add mcp23017 driver based on upstream mcp23s17 one.Pete Johanson
* Upstream Zephyr has in progress driver, so doing this locally here, until we can move over to that driver.
2021-09-08refactor(kscan): Demacroify GPIO matrix driverJoel Spadin
Refactored the GPIO matrix kscan driver so that only the data and config structures are defined in the foreach macro. Functionality is unchanged except for the addition of DT properties to adjust polling speed. This should make it easier to add other enhancements later, like improved and customizable debounce behavior.
2021-07-24feat: Add nrf VDDH battery driverJoel Spadin
Added a driver which uses the nRF52's ADC channel on the VDDH pin to read the battery voltage when using high voltage mode.
2021-01-01refactor(app): format with prettier (#563)innovaker
prettier --write . PR: #563
2020-12-03refactor: Align drivers with Zephyr file system conventionsinnovaker
PR: #400
2020-12-02refactor(kscan): Use PORT events for direct driverPete Johanson
* Switch interrupt configuration so nRF52 uses PORT events for lower power use, and wake from deep sleep. * Closes #272
2020-11-29Updated function calls with missing reference. GPIO missing.4pplet
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.
2020-11-20chore: add copyright to core Kconfiginnovaker
2020-11-20fix(drivers): rename module.yaml to module.ymlinnovaker
module.yaml is not a valid module filename. See Zephyr `scripts/zephyr_module.py`
2020-11-01fix(bvd): Add SENSOR_CHAN_ALL supportNick
2020-10-27Update demux kscan driver as per PR feedbackJay Greco
- Remove kscan_gpio_irq_callback - Remove kscan_gpio_irq_callback_handler - Remove irq_callbacks + Add TODO noting timer and sleep state interactions
2020-10-27Add new kscan_gpio_demux driverJay Greco
+ 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
2020-10-26Implement Kconfig and enhance error checksNick
2020-10-24fix: clang-formatNick
2020-10-24Remove newlib depNick
2020-10-23Check if fetch channel is supportedNick
2020-10-23Fix build for boards without voltage dividerNick
2020-10-23Merge branch 'main' into bluetooth/battery-reportingNick Winans
2020-10-23clang-format and add missing defconfig valuesNick
2020-10-23Refactor driver to use Sensor APINick
2020-10-11Reformatted according to clang-format lintNuxiom
2020-10-11Fix kscan_gpio_irq_callback_handler_##n conditional macroNuxiom
2020-10-06Merge pull request #211 from petejohanson/core/keymap-port-event-explorationPete Johanson
Use PORT events for kscan matrix interrupts, add option for deep sleep.
2020-10-06feat(power): Initial deep sleep work.Pete Johanson
* 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-04feat(kscan): Use PORT events for kscan matrix interruptsPete Johanson
* Lower power usage compared to regular interrupts on nrf52.
2020-10-04fix(kscan): fix direct GPIO when using interruptsJoel Spadin
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.
2020-10-03fix(ec11): allow more than one encoderJoel Spadin
Fixes "device.h:101:11: error: redefinition of '__device_ec11'" in firmware that has more than one encoder.
2020-10-01chore: Fix remaining formatting issues.Pete Johanson
2020-10-01chore: Fix some accidental formatting issues.Pete Johanson
2020-09-28Modify preprocessor directives to use basic #if !defined() rather than ↵Jason Chestnut
Zephyr macros where appropriate.
2020-09-27Fix preprocessor flag issues for pull request.jason
2020-09-25Fix merge error.Jason Chestnut
2020-09-25Add support to GPIO matrix driver for matrix polling, rather than ↵Jason Chestnut
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.
2020-09-25Add matrix polling logic to matrix GPIO driver.Jason Chestnut
2020-09-24Restore original matrix driver to correct implementation errors.Jason Chestnut
2020-09-24Add new matrix scan flag and implementation in the gpio matrix driver.Jason Chestnut
2020-09-24Rename kscan direct wired driver polling kscan flag in preparationfor ↵Jason Chestnut
addition of new matrix driver flag that enables polling.
2020-09-23Adding kconfig flag for enabling matrix polling (vs interrupts) on the ↵Jason Chestnut
matrix gpio driver.
2020-09-19fix(clang-format)Nick
2020-09-19Merge remote-tracking branch 'upstream/main' into bluetooth/battery-reportingNick
2020-09-19Voltage divider driver initial implementationNick
2020-09-14chore: clang-format the codebase.Pete Johanson
* Use the LLVM style * Override indent width (8) and column limit (100) * Fixes #142.
2020-09-10fix: Switch to single AUTHORS file.* Closes #164Pete Johanson
2020-09-01fix(kscan): Avoid sending duplicate kscan events.Pete Johanson
2020-08-18feeature(bt): Add "unpair combo" on startup.Pete Johanson
* 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-11Fix up some incorrect license headers.Pete Johanson
2020-08-06Encoder Kconfig fixes.Pete Johanson
2020-08-05Bump delay in scanning while held to 5ms.Pete Johanson
2020-07-24Tweaks for EC11 config.Pete Johanson