Commit Graph
135 Commits
Author SHA1 Message Date
zvecr 0150b7b71f clang-format-19 formatting fixes 2025-12-12 21:00:35 +00:00
QMK Bot 19bcb53e1d Merge remote-tracking branch 'origin/develop' into xap 2025-11-11 12:37:58 +00:00
Stefan KerkmannandSergey Vlasov c68e4dec10 [Core] suspend: suppress wake up keypress (#23389)
* suspend: suppress wake up keypress

Waking the host from suspend is done by pressing any key on the
keyboard, the regular key codes assigned to the keys are not important
and must not be sent - otherwise they usually end up in password prompts
as ghost characters that have to be deleted again. This commit adds
suppression for all keys pressed at the time of wake up. Once a key is
released it functions as a regular key again.

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>

* suspend: update wake up matrix after wake up delay

If USB_SUSPEND_WAKEUP_DELAY is set, the keyboard sleeps during wake up -
which can be up to multiple seconds. To handle key presses and releases
in that time frame we have to handle the following cases:

1. Key not pressed before suspend, and not pressed after wakeup → do
   nothing (normal case).
2. Key not pressed before suspend, but pressed after wakeup → set the
   wakeup_matrix bit to 1 (so that the press and release events would be
   suppressed).
3. Key pressed before suspend, but not pressed after wakeup → do nothing
   (the release event will be generated on the first matrix_task() call
   after the wakeup).
4. Key pressed before suspend, and still pressed after wakeup → do
   nothing (the release event will be generated some time later).

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>

* keyboards: anavi: macropad8: disable snake and rgb_test effects

...to shrink the binary size.
2025-11-11 23:35:03 +11:00
QMK Bot ef9c3810c1 Merge remote-tracking branch 'origin/develop' into xap 2025-06-27 07:18:04 +00:00
Joel Challis bc5c5e3251 Align sleep_led logic (#25395) 2025-06-27 08:17:28 +01:00
QMK Bot a88b5cd5eb Merge remote-tracking branch 'origin/develop' into xap 2025-05-22 13:31:52 +00:00
Pablo Martínez 955809bd5a Add compiler_support.h (#25274) 2025-05-22 23:31:15 +10:00
zvecr a9f676948b Merge remote-tracking branch 'origin/develop' into xap 2025-05-12 12:06:53 +01:00
Joel Challis 88c094908b Add raw_hid support to host driver (#25255) 2025-05-12 08:38:48 +10:00
QMK Bot 9ea0205881 Merge remote-tracking branch 'origin/develop' into xap 2025-04-22 22:05:06 +00:00
eynsai 7a2cd0fa96 High resolution scrolling (without feature report parsing) (#24423)
* hires scrolling without feature report parsing

* fix valid range for exponent

* fix incorrect minimum exponent value documentation
2025-04-23 00:04:31 +02:00
QMK Bot 479e507cff Merge remote-tracking branch 'origin/develop' into xap 2024-11-09 22:10:41 +00:00
Ryan a3cfb1dab7 Joystick: add support for 8-way hat switch (#24515) 2024-11-09 14:10:10 -08:00
QMK Bot 595e339f57 Merge remote-tracking branch 'origin/develop' into xap 2024-10-18 07:57:41 +00:00
Stefan Kerkmann 3f9d464412 [Core] usb_device_state: consolidate usb state handling across implementations (#24258)
* usb_device_state: add idle_rate, led and protocol

Previously all usb drivers and platform implementations (expect for our
oddball atsam) tracked the same two global variables:

- keyboard_protocol: to indicate if we are in report or boot protocol
- keyboard_idle: for the idle_rate of the keyboard endpoint

And a local variable that was exposed trough some indirection:

- keyboard_led_state: for the currently set indicator leds (caps lock etc.)

These have all been moved into the usb_device_state struct wich is
accessible by getters and setters.

This reduces code duplication and centralizes the state management
across platforms and drivers.

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>

* usb_device_state: reset protocol on reset

The usb hid specification section 7.2.6 states:

When initialized, all devices default to report protocol. However the
host should not make any assumptions about the device’s state and should
set the desired protocol whenever initializing a device.

Thus on reset we should always do exactly that.

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>

* keyboards: fix oversize warnings

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>

---------

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
2024-10-18 09:57:08 +02:00
QMK Bot fdb9cf5a36 Merge remote-tracking branch 'origin/develop' into xap 2024-10-15 14:06:53 +00:00
QMK Bot 7e53bb9965 Merge remote-tracking branch 'origin/master' into develop 2024-10-15 14:06:17 +00:00
Ryan 85a7627641 Digitizer: fix units tag in report descriptor (#24482) 2024-10-15 07:05:43 -07:00
QMK Bot 4620ec420b Merge remote-tracking branch 'origin/develop' into xap 2024-10-06 09:27:36 +00:00
eynsai 2cb35373c6 Extended wheel reports (#24422)
extended wheel reports
2024-10-06 11:26:55 +02:00
zvecr b43031ae00 Merge remote-tracking branch 'origin/develop' into xap 2024-03-14 10:59:03 +00:00
Joel Challis 63dd131d81 Refactor vusb to protocol use pre/post task (#14944) 2024-03-14 21:45:12 +11:00
zvecr 9a6f0873fb format 2024-03-13 00:40:27 +00:00
Drashna Jael're 5a9481b831 Merge remote-tracking branch 'origin/develop' into xap 2024-02-03 01:06:39 -08:00
Joel Challis 79020519b4 Align VUSB suspend protocol logic (#22688) 2024-02-01 15:33:57 +00:00
zvecr 2ae5b27fad Merge remote-tracking branch 'origin/develop' into xap 2024-01-09 14:25:05 +00:00
Joel Challis b6b3efc14b Remove console out endpoint (#22304) 2024-01-09 14:01:34 +00:00
zvecr 993e9c29e7 Merge remote-tracking branch 'origin/develop' into xap 2023-11-26 20:56:29 +00:00
Ryan 4601f339e4 V-USB: implement NKRO (#22398) 2023-11-26 22:50:53 +11:00
Ryan cbf538aaaa V-USB: Add generic send_report() function (#22323) 2023-11-26 22:50:21 +11:00
zvecr 60cf8ba553 Merge remote-tracking branch 'origin/develop' into xap 2023-11-01 01:19:30 +00:00
RyanandSergey Vlasov db4e3bb232 V-USB: Fix GET_IDLE/SET_IDLE (#22332)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2023-10-27 12:21:13 +11:00
QMK Bot b4e6f454b6 Merge remote-tracking branch 'origin/develop' into xap 2023-10-24 23:55:19 +00:00
Ryan b7e62af755 V-USB: Implement GET_PROTOCOL and SET_PROTOCOL handling (#22324) 2023-10-25 00:54:43 +01:00
QMK Bot 8f95479846 Merge remote-tracking branch 'origin/develop' into xap 2023-10-23 04:44:20 +00:00
Ryan 0c160e1fba Separate 6KRO and NKRO report structs (#22267) 2023-10-23 15:43:46 +11:00
QMK Bot 56b952686d Merge remote-tracking branch 'origin/develop' into xap 2023-07-28 00:05:36 +00:00
Stefan Kerkmann 32174abcfa Update keyboard report descriptor for USB compliance (#21626)
Running the "HID Tests" suite of the USB 3 Command Verifier (USB3CV)
tool resulted in the following error:

(HID: 3.2.61) The report descriptor returned in response to a
GetDescriptor(Report) must be compliant with the HID specification.

Byte Number:   37h (  55d)
Data Field: 91 02
Mnemonic:  Output
Value: (Variable)
Errors: Error:   LOGICAL MAX MUST be bounded by Report Size

The error stems from the fact that logical minimum and maximum are
global items, which means that the next item in a report descriptor
inherits the value from the previously set value. In this case the
status leds item inherited the logical minimum (=0) and maximum (=255)
from the keycodes item. As the status leds set a report size of 1 bit,
wich can only hold a boolean, it becomes clear that this range would
never fit.

The fix is straightforward, we just define a appropriate logical maximum
(=1), the mismatch is solved and our keyboard now passes the compliance
tests. Defining the logical minimum is redundant in this case but is
kept to form a logical block.
2023-07-28 01:05:01 +01:00
QMK Bot ff8d9fa382 Merge remote-tracking branch 'origin/develop' into xap 2023-06-22 14:07:41 +00:00
Ryan aad5746682 Move protocol makefiles into their respective folders (#21332)
* Move protocol makefiles into their respective folders

* Fix USB-USB converter
2023-06-22 15:07:28 +01:00
zvecr 2f7be506de Remove assumption on XAP interface number 2023-01-16 02:03:41 +00:00
QMK Bot 1af901f991 Merge remote-tracking branch 'origin/develop' into xap 2022-12-08 16:46:05 +00:00
85ee55ff3b Detect host OS based on USB fingerprint (#18463)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2022-12-09 03:45:30 +11:00
Nick Brassel 1d0787d861 Merge remote-tracking branch 'upstream/develop' into xap 2022-11-27 04:39:46 +11:00
Ryan 1e95f7be8f Joystick feature improvements (#19052) 2022-11-27 03:14:45 +11:00
zvecr 8aa871573b Merge remote-tracking branch 'origin/develop' into xap 2022-11-13 02:00:54 +00:00
Ryan 6cc9513ab0 Digitizer feature improvements (#19034) 2022-11-12 23:28:11 +00:00
QMK Bot cd1cbddd70 Merge remote-tracking branch 'origin/develop' into xap 2022-10-07 02:35:35 +00:00
Ryan 6dbbeea46a Refactor send_extra (#18615) 2022-10-06 19:35:01 -07:00
QMK Bot 2ce2b84d72 Merge remote-tracking branch 'origin/develop' into xap 2022-10-04 22:19:54 +00:00