summaryrefslogtreecommitdiff
path: root/app/drivers
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-14fix(kscan): Allow composite driver to handle missing children.Pete Johanson
For split keyboards using an IO expander over TRRS/i2c, if the right half isn't connected, we should be able to gracefully fallback to the left side still working.
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-08-24feat(display): IL0323 driver for EPD displays.Darryldh
* Basic driver, using the GD7965 driver as a basis, since the ICs are very similar.
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-07-17refactor(core): Move away from deprecated DT API.Pete Johanson
* 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
2021-06-08fix(kscan): Fix nibble demux scan errors on encoder rowJay Greco
+ 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)
2021-03-15fix(kscan): Proper direct wire warning message.Pete Johanson
2021-03-10fix(logging): remove unnecessary newlineOkke Formsma
2021-02-27Fix the label for the GPIO kscan driver.Pete Johanson
2021-02-04fix(power): Add support for capacitors on ADC for BVDjrhrsmit
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>
2021-02-02refactor(kscan): Fix polling of GPIO matrices.Pete Johanson
* 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
2021-02-02refactor(kscan): Remove explicit default n from kscan configs.Pete Johanson
* Actually allow defaulting yes in other places.
2021-01-01refactor(app): format with prettier (#563)innovaker
prettier --write . PR: #563
2020-12-28refactor: replace filename hyphens with underscoresinnovaker
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
2020-12-14refactor(app): replace `void` with `const struct device *dev` in ISR CBsinnovaker
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace `struct device *` with `const struct device *`innovaker
Replaced with RegExp: /(?<!const )(struct device \*)/g See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace `driver_data` with `data`innovaker
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace `config_info` with `config`innovaker
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace Zephyr integer types with C99 integer typesinnovaker
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
2020-12-08fix(kscan): Fix building kscan for tests.Pete Johanson
2020-12-04fix(drivers): Remove conditional from directories.Pete Johanson
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