PS2 GPIO: Added initial structure
PS2 GPIO: Added interrupt handler and pin reading/writing helper functions
PS2 GPIO: Added reading mode
PS2 GPIO: Add zephyr PS2 API support for callback and read function
PS2 GPIO: Fix reading not working with real PS2 device
PS2 GPIO: Added write with separate edge rising callback
PS2 GPIO: Made single interrupt handler
PS2 GPIO: Switch to inactive and falling handler only
PS2 GPIO: Switch back to edge falling
PS2 GPIO: Working without writing
PS2 GPIO: Enable both edges (working)
PS2 GPIO: Somewhat working write
PS2 GPIO: Write with ack working, but read always wrong stop bit
PS2 GPIO: Cleanup code
PS2 GPIO: Fix write not working by increasing clock holding time
PS2 GPIO: Adde scl clock timeout for reads
PS2 GPIO: Add scl clock timeout for writes
PS2 GPIO: Moved pin config into separate functions (not working)
PS2 GPIO: Make read work by removing some logging
PS2 GPIO: Fixed memory issue with fifo
PS2 GPIO: Kind of working sometimes except for ack bit
PS2 GPIO: Working without ack
PS2 GPIO: Fix crash: Disable resend command in read abort
PS2 GPIO: Make write work (But next read fails)
PS2 GPIO:
PS2 GPIO: I think the next read fails because we swallow the first 0 bit when reading the ack.
PS2 GPIO: Disable logging go speed up processing
PS2 GPIO: Made writing mostly work; read afterwards inconsistent
PS2 GPIO: Added post write debug log
PS2 GPIO: Improved post-write reading success rate
PS2 GPIO: Adjust timings
PS2 GPIO: Added logging of time between interrupts
PS2 GPIO: Instead of sleep() for write line inhibition, do delayable work
PS2 GPIO: Compensate for missing stop bit in read when it happens directly after write
PS2 GPIO: Adding interrupt logging
PS2 GPIO: Fix set_scl() setting sda and set_sda() setting scl
PS2 GPIO: Make interrupt logging work for sends
PS2 GPIO:
PS2 GPIO: Add interrupt logging to read functions
PS2 GPIO: Add ability to disable interrupt callback during write inhibition phase
PS2 GPIO: Rename inhibit slc duration config option
PS2 GPIO:
PS2 GPIO: Add missing inhibit setting rename
PS2 GPIO: Improve handling of spurious interrupts after writing better
PS2 GPIO:
PS2 GPIO: Adjust scl timeouts
PS2 GPIO: Added logging helper
PS2 GPIO:
PS2 GPIO: Logging helper
PS2 GPIO: Start fixing original write functions
PS2 GPIO: Cleanup read code
PS2 GPIO: Cleanup write code
PS2 GPIO: Adjust read/write scl timeouts
PS2 GPIO: Disable logger
PS2 GPIO: Add custom interrupt logging
PS2 GPIO: Enable interrupt logger
PS2 GPIO: Added separate write scl timeout for the first clock
PS2 GPIO: Fix running out of memory due to read queue
PS2 GPIO: Allow disabling of interrupt logs
PS2 GPIO: Improve logging and comments
PS2 GPIO: Removed old interrupt code
PS2 GPIO:
PS2 GPIO: interrupt stuff
PS2 GPIO:
PS2 GPIO: x
PS 2 Mouse: Add initial mouse driver for testing PS2 driver
PS2 GPIO: Add ps2 device to callback
PS2 Mouse: Added initial mouse movement cmd parsing
PS2 Mouse: Added actual mouse movement
PS2 Mouse:
PS2 Mouse: Inverted y for zmk as that is what zmk thinks is up
PS2 Mouse:
PS2 Mouse: comm
PS2 Mouse: Changed config options to match zmk mouse naming
PS2 Mouse: Added options to invert x and y mouse movements
PS2 Mouse: Rename mouse movement to mouse activity
PS2 Mouse: Added mouse button support
PS2 GPIO: Small cleanup
PS2 GPIO: Move interrupt logging around
PS2 GPIO: Added write re-try on fail
PS2 GPIO: Initial attempt at write await response (not working)
PS2 GPIO: Revert "Initial attempt at write await response (not working)"
PS2 GPIO:
PS2 GPIO: This reverts commit 6e77047ba8f8537e076f3a583d03c6222874998c.
PS2 GPIO: Added reason do abort_read()
PS2 GPIO: Disable resend on read failure for debugging
PS2 GPIO: Initialize current write byte
PS2 GPIO: Added max read retry
PS2 GPIO: Disable log interrupt
PS2 GPIO: Made timings based on ps2 protocol defines
PS2 GPIO:
PS2 GPIO: Move settings
PS2 GPIO: Added write_byte_await_response()
PS2 GPIO: Fix write retry incorrect retry number log
PS2 Mouse: Sort defines
PS2 Mouse: Improve init sequence
PS2 Mouse: Removed unneeded stream mode enabling command
PS2 GPIO: Make no response in write_byte_await_response an failure
PS2 Mouse: During init send reset command on every 4th attempt
PS2 Mouse: Add sample rate setting support
PS2 Mouse: Start use mouse events for movements
PS2 GPIO: Change most logging to debug
PS2 Mouse: Change logs from inf to dbg
PS2 Mouse: Experiment with different mouse movement methods
PS2 Mouse: Report mouse activity through timer instead of as it arrives.
PS2 Mouse: Use zmk log level instead of ps2
PS2 GPIO: Moved retry logic into separate function that also resends on error resp from device
PS2 GPIO:
PS2 GPIO: Enable retry send for ps2 interface
PS2 GPIO:
PS2 GPIO: Fix write failure error code
PS2 GPIO: Cleanup write code slightly
PS2 GPIO: Disable interrupt logging
PS2 GPIO: Use just one function for parity checking
PS2 GPIO: Small cleanup of read and write
PS2 GPIO:
PS2 GPIO: Small comment improvement
PS2 GPIO: In read_interrupt, moved data bits to a more logical position
PS2 GPIO:
PS2 GPIO: Read interrupt fix
PS2 GPIO: Call zephyr PS2 callback from a worker
PS2 GPIO: Remove unneeded gpio config flags
PS2 GPIO: Allow to enable and disable interrupt log through kconfig
PS2 Mouse: Re-enable resend request due to packet misalignment
PS2 Mouse: Parse cmd buffer using a struct instead of pointers
PS2 Mouse: Cleanup and improve documentation
PS2 Mouse: Silence error on read data queue timeout
PS2 Mouse: Improved init sequence
PS2 Mouse: Move init functions around
PS2 Mouse: Added scroll mode
PS2 Mouse: Make scroll mode configurable
PS2 Mouse: Added functions to incr and decr sampling rate
PS2 GPIO: Update blocking timeout for retry changes
PS2 GPIO: Increased timeout for write_byte_await_response()
PS2 GPIO: Added custom work queue
PS2 Mouse: Added mouse settings behavior (with queue)
PS2 Mouse: Removed queue from mouse setting behavior
PS2 Mouse:
PS2 Mouse: A queue was added to the ps2 gpio driver itself. So there is no need for it here anymore.
PS2 GPIO: Don’t log error on timed out ps2_read()
PS2 Mouse: Added reset-on-power function for trackpoints
PS2 Mouse: Add command to check if device is trackpoint
PS2 Mouse: Added send_cmd function that can send multibyte commands and read response
PS2 Mouse: Added trackpoint press to select and sensitivity setting
PS2 Mouse: Add config option for tap to select
PS2 Mouse: Fixed power-on-reset
PS2 Mouse: Add trackpoint swap xy command
PS2 Mouse: Add swap xy setting
PS2 Mouse: Added option to invert x and y directly on the trackpoint
PS2 Mouse: Added negative inertia setting
PS2 Mouse: Added upper plateau speed (value6)
PS2 Mouse: Added press-to-select threshold
PS2 Mouse: Added keybindings for TP settings
PS2 GPIO: Increased log break time
PS2 GPIO: Re-enable re-send request on read error
PS2 GPIO: Fix outdated comment
PS2 GPIO: Reduce debug logging
PS2 Mouse: Reduce logging
PS2 Mouse: Added config option to disable clicking
PS2 Mouse: Added config option for sampling rate
PS2 GPIO: Automatically adjust BT priorities when PS2 GPIO driver is enabled
PS2 Mouse: Lower default priority of NRF IRQs
PS2 Mouse: Add out of alignment detection
PS2 Mouse: Simplify out of alignment check
PS2 GPIO: Fixed deadlock on write due to wrong wokr queue priorities
PS2 GPIO: Log reason for write finish
PS2 GPIO: Increase SCL timeout
PS2 GPIO: Add pos to abort read logging
PS2 GPIO: For writes read ack bit before interrupt logging
PS2 GPIO: Fix interrupt_log_add crash
PS2 GPIO: Make interrupt_log. log in background
PS2 GPIO: Decrease priority for inhibition wait thread
PS2 GPIO: Increase timeout for first write clock
PS2 GPIO: Add argument to interrupt_log
PS2 GPIO: Improve write debug logging
PS2 Mouse: Improve misalignment detection by checking if there was prev movement
PS2 Mouse: Fix crash caused by zephyr LOG bug due to transient strings
PS2 Mouse:
PS2 Mouse: https://github.com/zephyrproject-rtos/zephyr/issues/44996
PS2 GPIO: Use main write function for 0xfe retry cmd
PS2 GPIO: Add resend callback to gpio driver
PS2 GPIO: Increase inhibition delay timer
PS2 GPIO: Properly fail write if semaphore times out
PS2 Mouse: Added resend callback
PS2 Mouse: Fix TP incr/decrease not remembering prev value
PS2 Mouse: Reset cmd buffer on misalignment
PS2 Mouse: Re-enable abort on sharp movement
PS2 Mouse: Fix mouse scrolling unintendedly if mouse mode is disabled
PS2 Mouse: Log button presses as info
PS2 GPIO: Re-enable scl interrupt on write failure
PS2 GPIO: Increase write max retry
PS2 Mouse: Make compatible with zephyr 3.2 update
PS2 GPIO: Make compatible with zephyr 3.2
PS2 GPIO: Use new zephyr gpio_*_dt apis
PS2 Mouse: Use new zephyr gpio_*_dt apis
PS2 GPIO: Prevent lockout on resend by using cb worker
PS2 GPIO: Add missing interrupt detection
PS2 GPIO: Added write error code for semaphore timeout
PS2 GPIO: Added mutex to prevent multiple threads writing at once
PS2 Mouse: Treat packet overflow as mistransmission
PS2 Mouse: If multiple mouse buttons are changed in one packet, treat it as mistransmission
PS2 Mouse: Fix value6 functions actually setting neg inertia
PS2 Mouse: Remove kconfig setting for mouse
PS2 Mouse: Reordered includes
PS2 Mouse: Switched tp sensitivity setting from float to int
PS2 Mouse: Added setting saving and restoring
PS2 Mouse: Created proper, automatic Kconfig
PS2 Mouse: Reorder includes
PS2 GPIO: Enable PS2 GPIO driver automatically if the devicetree node is present
PS2 Mouse: Rename ps2_mouse to mouse_ps2
PS2 Mouse: Fully rename ps2_mouse to mouse_ps2
PS2 Mouse: Cleanup of mouse_ps2 function naming and order
PS2 Mouse: Renamed activity cmd to packet
PS2 Mouse: Removed sampling rate from being set from keypresses
PS2 Mouse: Remove redudant decr/incr functions
PS2 Mouse: Rename array functions
PS2 Mouse: Ensure all functions have common prefix zmk_mouse_ps2
PS2 Mouse: Reduce logging
PS2 GPIO: Make sure all functions have the ps2_gpio prefix
PS2 UART: Added initial UART PS2 driver
PS2 UART: Made uart PS2 read work
PS2 UART: Refactored uart read code
PS2 UART: Added parity error checking
PS2 UART: Initial attempt at pincntrl switching
Revert "PS2 UART: Initial attempt at pincntrl switching"
This reverts commit 5538731a90031b7607f05775135385bbe14464dc.
PS2 UART: Initial version of GPIO write (not working)
PS2 UART: Kindoff working
PS2 UART: Working
PS2 UART: Small cleanup
PS2 UART: Adjust timings and improve comments
PS2 Mouse: Increase init priority to be after UART drivers
PS2 UART: Attempt to not block interrupt (not working, worker never called)
Revert "PS2 UART: Attempt to not block interrupt (not working, worker never called)"
This reverts commit 6c37f9a236137cc0ca873c6ee4afef3f69eb5708.
PS2 Mouse: Add config option to disable additional error mitigation
Auto Layer: Add automatic layer toggling on mouse movement
PS2 Mouse: Log transmission error reason
PS2 UART: Check read error in received_byte
PS2 UART: Added blocking write
Auto Layer: Fixes
Scroll Mode: Initial implementation
PS2 Mouse: Auto lint code
PS2 Mouse: Scroll mode improvements (uncommitted changes from 3 month ago)
PS2 GPIO: Apply new auto-format to ps2_gpio
PS2 UART: Apply new auto-format
PS2 GPIO: Make write mutex names unique
PS2 UART: Make write mutex names unique
PS2 GPIO: Fix zephyr 3.5 compile errors
PS2 UART: Fix zephyr 3.5 compile errors
Mouse Settings & Scroll Mode: Apply new auto-formatting
Mouse Settings: Silence zephyr 3.5 compile warnings
PS2 Mouse: Move to zephyr 3.5 input system
PS2 Mouse: Add mouse ps2 work queue
PS2 Mouse: Increase err_msg buffer size for zmk_mouse_ps2_send_cmd_resp to avoid truncating
PS2 UART: Attempt adding pinctrl states dynamically (unsuccessful)
Revert "PS2 UART: Attempt adding pinctrl states dynamically (unsuccessful)"
This reverts commit 1a2c3f6f6832a95a828675a093bef7070fbe5bac.
PS2 UART: Fix zephyr 3.5 pinctrl change error
the issue was that I was using the sleep pinctrl state, because I couldn't figure out how to create a custom state.
And in zephyr 3.2 that worked fine, but in 3.5 it disables the sleep state if CONFIG_PM_DEVICE=n.
So the state was missing.
Mouse Settings & Scroll Mode: Update mouse settings and scroll mode behaviors to new labelless behavior init method
PS2 Mouse: Disable restore of mouse PS2 settings
Mouse Auto Layer: Added toggle delay to prevent accidental activations
PS2 Mouse: Added script to generate interrupt priority overrides for zmk-config
PS2 Mouse: Don’t override interrupt priorities in all zmk builds by default
PS2 GPIO: Potentially fix SCL not being pulled down during write
PS2 UART: Potentially fix inhibition not being done correctly
PS2 Mouse: Reset device if invalid self-test result is received
PS2 UART: Fix PM_DEVICE not enabling
PS2 GPIO: Improve PS2 GPIO kconfig documentation
PS2 UART: Lower BT interrupt priorities
PS2 Mouse: Delay PS2 init sequence to give mouse time to send init data
PS2 UART: Fix first write not working
PS2 UART: Add debug write function
PS2 UART: Disable debug write function
PS2 UART: Log received bytes
PS2 UART: Use delayable instead of k_busy_wait
Revert "PS2 UART: Use delayable instead of k_busy_wait"
Realized that this is pointless, since that’s a blocking function anyways.
We need to not block in the interrupt handler rather than here.
This reverts commit eee0c35793ccccf40d72742d19cc85762423a103.
PS2 UART: Move scl interrupt into worker
PS2 UART: Add cur write pos
Revert "PS2 UART: Move scl interrupt into worker"
This reverts commit ea24c68b1af0f6e4a367622829d92f380d92a27f.
PS2 UART: Added async interrupt writing mode
PS2 UART: Ignore framing errors for 0xfa received bytes
PS2 UART: Log write and received bytes only in DBG
PS2 Mouse: Remove kconfig settings that are handled by input-config
PS2 Mouse: Moved sampling rate and press to select from kconfig to device tree
PS2 Mouse: Log when settings were set successfully
PS2 Mouse: Added devicetree settings for TP settings
Correct val6 default value
PS2 Mouse: Enable settings restore again
PS2 Mouse: Don’t restore runtime settings if device config is present
Mouse Settings: Added log and reset behavior
Adjust settings log
PS2 Mouse: Fix wrong type for tp press to select var
PS2 Mouse: Replace kconfig enable clicking with devicetree disable clicking
PS2 Mouse: Disable error mitigations by default
PS2 Mouse: Moved axis options from kconfig to devicetree
PS2 Mouse: Removed scroll mode behavior
PS2 Mouse: Move scroll mode from kconfig to devicetree
PS2 Mouse: Removed movement buffer / queue
Remove butter kconfigs
PS2 Mouse: Moved mouse_ps2 driver to module
PS2 Mouse: Convert clicking to zephyr 3.5 input system
Mouse Auto Layer: Removed it in preparation for zephyr 3.5 module
PS2 UART: Fix Linking error due to missing config options if logging is disabled
PS2 UART: Replace data queue fifo with message queue to get rid of heap use
PS2 GPIO: Replace data queue fifo with message queue to get rid of heap use
Input Listener: Added logging
Auto Layer Toggle: Added initial version
Auto Layer Toggle: Changed how config is retrieved
Auto Layer Toggle: Adjust logging
Auto Layer Toggle: Remove dependency on urob’s “Zen display & battery tweaks”
That commit adds an additional parameter to the `zmk_keymap_layer_activate` function.
Need to find a better way to make the code compatible whether urob is used or not.
5796aa0104
PS2 GPIO & UART: Apply zmk auto-formatting
PS2 UART, GPIO, Mouse: Make resend callback optional to allow compilation without zephyr fork
PS2 Mouse & Auto Layer Toggle: Add urob compatibility option
PS2 Mouse: Remove unneeded file
* Dedicated mouse source directory.
* Split mouse HID into dedicated USB endpoint and HoG service.
* Enable composite USB device automatically, tweak the
various default sizes.
Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Robert U <urob@users.noreply.github.com>
Co-authored-by: Shawn Meier <ftc@users.noreply.github.com>
* Instead of gpio key behavior trigger, add new kscan driver that
decorates/wraps a given kscan driver and will invoke basic system
behavior assigned to a given row + column, without the need for keymap
mapping in the matrix transform, bypassing keymaps entirely.
* Better naming for gpio-key behavior triggers.
* Tweaks to scanned behavior trigger to avoid bad semaphore use,
and reduce chance of issues with slowly scanned matrixes.
* Various code cleanups of style issues.
Initial work on a soft on/off support for ZMK. Triggering soft off
puts the device into deep sleep with only a specific GPIO pin
configured to wake the device, avoiding waking from other key
presses in the matrix like the normal deep sleep.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Added a zmk_settings_erase() function to clear all saved settings. This
does not go through Zephyr's settings subsystem, but instead directly
clears the data from the setting storage backend, so a reboot is needed
for it to take effect.
* Add a new Kconfig symbol to enable the low priority queue, and make
the two features that depend on it `select` the symbol to turn it on.
This helps ensure no wasted RAM/ROM on devices that don't need it.
* Shift to using an extra Zephyr module to do keymap location
work after all board roots are resolved. This avoids duplicate work
and allows us to load custom boards from Zephyr modules as well as
user config setups.
Added BEHAVIOR_DT_DEFINE() and BEHAVIOR_DT_INST_DEFINE(), which work
exactly like the DEVICE_*_DEFINE() macros, except they also register the
device as a behavior by adding a pointer to it to a memory section.
Added zmk_behavior_get_binding(), which works like device_get_binding()
except that it only searches the devices that have been registered as
behaviors. This ensures that behaviors cannot have name collisions with
other devices defined by the SoC, which will be important when we remove
the label property from behaviors so they are given their node names.
As an added benefit, this is faster since it searches a smaller list.
Some basic benchmark code I wrote indicates it takes 30-70% as long,
depending on where the behavior is in the list and whether the name
string is an exact pointer match.
From now on, behaviors should use BEHAVIOR_*_DEFINe() instead of
DEVICE_*_DEFINE(), and any code that looks up a behavior by name should
use zmk_behavior_get_binding() instead of device_get_binding().
* Add HID report/descriptor for a new report with mouse buttons,
and x/y/wheel deltas.
* New mouse key press behavior for press/release of mouse keys.
* Add constants for HID main item values (e.g. data/array/absolute)
* Define and use constants for our HID report IDs.
* Add two new compatibles for macros that
take one or two parameters when bound in
a keymap.
* Use `¯o_param_1to1`, `¯o_param_1to2`, `¯o_param_2to1`,
and `¯o_param_2to2` control entries in the bindings for the macro
to have the next binding entry have it's values substituted.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
* Add new sensor behaviors that either take full bindings
add definition, or accept parameters when bound in the
keymap.
* Remove existing hard-coded key press sensor behavior
and instead leverage new generic sensor behaviors to
achieve the same functionality.
Co-authored-by: nick@conway.dev
* Move to ZephyrBuildConfig package based on Zephyr best practices.
* Support multiple shields properly, e.g. -DSHIELD="foo bar", which
allows using existing upstream shields like `ssd1306_128x64` along
with another ZMK shield.
* Properly *add* the "ZMK config" .conf file to the conf file list,
so that existing board .conf files in `app/boards/<board>.conf` are
properly honored still. Needed for overrides to usptream boards when
combined with a local `<shield>.conf` file.
* Add new API/status to track state of the
peripheral connection to the central.
* Add new peripheral status widget for displaying
the current status of the connection to
the central.
* Add strlcpy from public domain version.
* Leverage strlcpy to detect truncation of behavior dev strs, and log.
* Use `offsetof` for cleaner detection on peripheral side.
* GATT characteristic allowing passng data + behavior
label to invoke the behavior on the peripheral side.
* Behaviors have a locality setting to specify where they run.
* Build reset/power/RGB on peripheral.
This is a generalization of the existing concept of tri-layer support
that's already well known. Essentially, a conditional-layer
configuration activates a particular layer (the then-layer) when one or
more other layers (the if-layers) are activated.
This is commonly used on ortho keyboards to activate a third "adjust"
layer while the primary two layers ("lower" and "raise") are active.