qmk/quantum/process_keycode
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
..
autocorrect_data_default.h
process_audio.c
process_audio.h
process_auto_shift.c
process_auto_shift.h
process_autocorrect.c
process_autocorrect.h
process_backlight.c Separate keycode handling for LED Matrix and Backlight (#23426) 2024-04-11 14:06:36 +10:00
process_backlight.h
process_caps_word.c Ignore space cadet key release when caps word is active (#21721) 2024-01-09 22:07:10 +11:00
process_caps_word.h
process_clicky.c
process_clicky.h
process_combo.c Update combo user function variable (#24467) 2024-10-12 00:13:31 +01:00
process_combo.h
process_connection.c Add new connection keycodes for Bluetooth, 2.4GHz. (#24251) 2024-08-27 10:52:23 +10:00
process_connection.h Add new connection keycodes for Bluetooth, 2.4GHz. (#24251) 2024-08-27 10:52:23 +10:00
process_dynamic_macro.c Add dynamic macro keyboard callbacks (#24142) 2024-08-18 01:35:10 +01:00
process_dynamic_macro.h Add dynamic macro keyboard callbacks (#24142) 2024-08-18 01:35:10 +01:00
process_dynamic_tapping_term.c
process_dynamic_tapping_term.h
process_grave_esc.c
process_grave_esc.h
process_haptic.c [Core] usb_device_state: consolidate usb state handling across implementations (#24258) 2024-10-18 09:57:08 +02:00
process_haptic.h
process_joystick.c
process_joystick.h
process_key_lock.c
process_key_lock.h
process_key_override.c Add support for key override introspection. (#24120) 2024-07-16 09:22:17 +10:00
process_key_override.h Add support for key override introspection. (#24120) 2024-07-16 09:22:17 +10:00
process_leader.c
process_leader.h
process_led_matrix.c LED Matrix: replace backlight keycodes with newly added ones (#23455) 2024-04-13 04:15:22 +01:00
process_led_matrix.h Separate keycode handling for LED Matrix and Backlight (#23426) 2024-04-11 14:06:36 +10:00
process_magic.c
process_magic.h
process_midi.c MIDI sustain effect fix on qmk 0.22.2 (#22114) 2024-01-09 22:05:30 +11:00
process_midi.h
process_music.c
process_music.h
process_programmable_button.c
process_programmable_button.h
process_repeat_key.c
process_repeat_key.h
process_rgb_matrix.c Add process_keycode handlers for new RGB Matrix and Underglow keycodes (#23896) 2024-06-13 21:59:46 +10:00
process_rgb_matrix.h Add process_keycode handlers for new RGB Matrix and Underglow keycodes (#23896) 2024-06-13 21:59:46 +10:00
process_secure.c
process_secure.h
process_sequencer.c
process_sequencer.h
process_space_cadet.c Ignore space cadet key release when caps word is active (#21721) 2024-01-09 22:07:10 +11:00
process_space_cadet.h Ignore space cadet key release when caps word is active (#21721) 2024-01-09 22:07:10 +11:00
process_steno.c Remove redundant steno eeconfig init (#22680) 2024-02-01 11:58:30 +00:00
process_steno.h
process_tap_dance.c Tap dance introspection (#24049) 2024-07-06 00:57:54 +01:00
process_tap_dance.h Tap dance introspection (#24049) 2024-07-06 00:57:54 +01:00
process_tri_layer.c
process_tri_layer.h
process_ucis.c
process_ucis.h
process_underglow.c Add process_keycode handlers for new RGB Matrix and Underglow keycodes (#23896) 2024-06-13 21:59:46 +10:00
process_underglow.h Add process_keycode handlers for new RGB Matrix and Underglow keycodes (#23896) 2024-06-13 21:59:46 +10:00
process_unicode_common.c
process_unicode_common.h
process_unicode.c
process_unicode.h
process_unicodemap.c
process_unicodemap.h