Commit Graph

210 Commits

Author SHA1 Message Date
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
Ryan
9884e4982b
Rename RGB/HSV structs: keyboard-level code (#24476) 2024-10-12 19:00:56 +01:00
Ryan
6fa11bf219
Separate RGBLight/RGB Matrix keycode handling (#23679)
* Separate RGBLight/RGB Matrix keycode handling

* Remove `_DISABLE_KEYCODES` handling

* Update RGB Matrix keycode docs

* Update underglow keycodes for previously migrated boards

* Update keycodes for boards with custom handling

* Fix typos

* Fix bad merge
2024-10-12 18:43:50 +02:00
Ryan
208ebf54a9
WS2812 API rework (#24364)
* Begin WS2812 API rework

* Move RGBW conversion, clean up color.h, fix RGBW for AVR bitbang

* Formatting & update PS2AVRGB I2C driver (untested)

* Tested ARM bitbang RGB+RGBW

* Tested ARM SPI RGB - RGBW not working

* Tested ARM PWM RGB+RGBW

* Tested RP2040 PIO driver RGB+RGBW

* Update RGBLight

* Formatting

* Fix BM60HSRGB rev2

* Fix oddforge/vea

* Fix 1k and XD002 RGBLite

* Fix model_m/mschwingen

* Fix handwired/promethium

* Rename `WS2812_LED_TOTAL` for BM60HSRGB

* Fix work_louder boards

* Fix dawn60

* Fix rgbkb/pan

* Fix neson_design/700e and n6

* Fix ergodox_ez/shine

* ergodox_ez/shine: invert indices for left half

* Fix matrix/abelx

* Fix matrix/m20add

* Remove custom rgblight driver for matrix/noah - should be done with lighting layers

* Fix LED indexes for RGBLight split

* Rename `convert_rgb_to_rgbw()` to `ws2812_rgb_to_rgbw()`

* Update WS2812 API docs

* `ergodox_ez/shine`: simplify LED index calculation

* LED/RGB Matrix: Add weak function for LED index resolution

* Bandaid fix for RGB Matrix splits not using WS2812

* `steelseries/prime_plus`: redo custom RGBLight driver

* Update keyboards/steelseries/prime_plus/rgblight_custom.c

Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>

---------

Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
2024-10-06 21:01:07 +13:00
Nick Brassel
45dc2499dc
Remove all via-enabled keymaps, including via. (#24322) 2024-08-26 07:51:22 +10:00
Ryan
8f6d2ac53c
Update Underglow keycodes (#23765)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2024-08-25 22:15:07 +10:00
Joel Challis
ce1adce696
Migrate split.soft_serial_pin to split.serial.pin O-Z (#24146)
Migrate split.soft_serial_pin to split.serial.pin
2024-07-23 12:12:52 +01:00
Dasky
d5cc00ab62
Remove instances of MASTER_LEFT. (#24163) 2024-07-20 23:49:20 +01:00
Joel Challis
f0807ea64f
Migrate SPLIT_HAND_PIN to json (#23924) 2024-07-13 13:29:16 +01:00
Joel Challis
26e84c513c
Migrate SERIAL_DRIVER to json (#23925) 2024-07-13 13:12:35 +01:00
Ryan
bc0c69570b
Rename encoder pins defines (#24003) 2024-07-03 17:18:27 +10:00
James Young
634ebc9763
Migrate LOCKING_*_ENABLE to Data-Driven: Q-R (#23781)
Affects:

  - `qpockets/space_space/rev1`
  - `qpockets/space_space/rev2`
  - `quad_h/lb75`
  - `quantrik/kyuu`
  - `qwertlekeys/calice`
  - `rabbit/rabbit68`
  - `rainkeebs/delilah`
  - `rainkeebs/rainkeeb`
  - `rainkeebs/yasui`
  - `rart/rart45`
  - `rart/rart4x4`
  - `rart/rart60`
  - `rart/rart67`
  - `rart/rart67m`
  - `rart/rart75`
  - `rart/rart75m`
  - `rart/rartand`
  - `rart/rartland`
  - `rart/rartlice`
  - `rart/rartlite`
  - `rart/rartpad`
  - `rate/pistachio/rev1`
  - `rate/pistachio/rev2`
  - `rate/pistachio_mp`
  - `rate/pistachio_pro`
  - `redox/rev1`
  - `redscarf_iiplus/verb`
  - `redscarf_iiplus/verc`
  - `redscarf_iiplus/verd`
  - `retro_75`
  - `reversestudio/decadepad`
  - `reviung/reviung5`
  - `reviung/reviung33`
  - `reviung/reviung34`
  - `reviung/reviung39`
  - `reviung/reviung41`
  - `reviung/reviung53`
  - `rgbkb/zen/rev1`
  - `rgbkb/zen/rev2`
  - `rmi_kb/aelith`
  - `rmi_kb/chevron`
  - `rmi_kb/herringbone/pro`
  - `rmi_kb/herringbone/v1`
  - `rmi_kb/squishy65`
  - `rmi_kb/squishyfrl`
  - `rmi_kb/squishytkl`
  - `rmi_kb/wete/v1`
  - `rmi_kb/wete/v2`
  - `rocketboard_16`
  - `rominronin/katana60/rev1`
  - `rominronin/katana60/rev2`
  - `roseslite`
  - `rotr`
  - `rpiguy9907/southpaw66`
  - `rubi`
  - `rura66/rev1`
  - `ryanbaekr/rb1`
  - `ryanbaekr/rb18`
  - `ryanbaekr/rb69`
  - `ryanbaekr/rb86`
  - `ryanbaekr/rb87`
  - `ryanskidmore/rskeys100`
  - `ryloo_studio/m0110`
2024-05-23 20:30:25 +01:00
Ryan
5fda349018
Remove RGB keycodes from boards with no RGB config (#23709) 2024-05-20 17:11:49 +10:00
Ryan
1184e0d9be
Adjust keycode alignment around QK_BOOT (#23697) 2024-05-11 16:50:48 +01:00
Joel Challis
2d4832f57a
Align RGBKB keyboards to current standards (#23663) 2024-05-11 13:11:50 +01:00
Ryan
0ff53b2498
Rename RGBW define to WS2812_RGBW (#23585) 2024-04-28 00:36:54 +10:00
Joel Challis
d333a25868
Add audio driver to keyboard.json schema (#23616) 2024-04-26 05:41:22 +01:00
Joel Challis
3d83b3e7c5
Migrate build target markers to keyboard.json - Misc (#23609) 2024-04-25 08:42:48 +01:00
Duncan Sutherland
32136afe24
Change to development_board (#21695) 2024-04-23 19:47:30 +10:00
Joel Challis
214e091ec2
Corrections to split keyboard migrations (#23462) 2024-04-12 13:44:06 +01:00
Duncan Sutherland
8caa8674d2
Move SPLIT_KEYBOARD to data driven (#21410) 2024-04-11 20:22:15 -07:00
Joel Challis
ad8d934d3c
Tidy up default layer handling in keymaps (#23436) 2024-04-08 02:56:46 +01:00
Ryan
a14c03b96e
Remove more unnecessary quantum.h includes (#23402) 2024-04-05 14:48:21 +11:00
Joel Challis
831deac212
Migrate build target markers to keyboard.json (#23293) 2024-03-30 11:31:50 +00:00
Ryan
f7cf40fa77
Add init function to RGBLight driver struct (#23076) 2024-03-18 22:03:27 +11:00
Ryan
569b0c70be
WS2812 PWM: prefix for DMA defines (#23111)
* WS2812 PWM: prefix for DMA defines

* Add backward compatibility defines
2024-03-02 17:16:47 +00:00
Joel Challis
e26e12402b
Manual user keymap removal (#23104) 2024-02-19 09:48:06 +00:00
Ryan
a522b1f156
i2c: rename read/write register functions (#22905) 2024-01-16 02:26:40 +00:00
Joel Challis
a90b45e832
Migrate RGB Matrix config to info.json - RS (#22909) 2024-01-16 01:03:55 +00:00
fauxpark
2c191e21c2 Merge remote-tracking branch 'upstream/master' into develop 2023-12-20 16:03:14 +11:00
Ryan
8812a09581
Rename RGB_DISABLE_WHEN_USB_SUSPENDED -> RGB_MATRIX_SLEEP (#22682) 2023-12-20 13:31:50 +11:00
Nick Brassel
d235352504
Remove obvious user keymaps, keyboards/{b,c}* edition. (#22693) 2023-12-18 16:05:50 +11:00
QMK Bot
62db54dc32 Merge remote-tracking branch 'origin/master' into develop 2023-12-18 01:49:49 +00:00
Joel Challis
990895f03f
[Keymap Removal] keebio/iris and related keymaps. (#22690) 2023-12-18 12:49:19 +11:00
Nick Brassel
ae90b1d1e5
Merge remote-tracking branch 'upstream/master' into develop 2023-12-17 22:27:35 +11:00
Nick Brassel
7ea022ba88
[Keymap Removal] Planck and related keymaps. (#22683) 2023-12-17 21:54:01 +11:00
Ryan
e648155113
Rename RGBLED_NUM -> RGBLIGHT_LED_COUNT (#22570) 2023-12-12 15:30:08 +11:00
Joel Challis
2acb426b8e
Remove "empty" files (#22603) 2023-12-05 08:37:00 +00:00
Joel Challis
1ed03f498f
Remove userspace keymaps (#22544) 2023-11-27 05:36:45 +11:00
Joel Challis
a0a6820c1b
Migrate some dip switch config to info.json (#22437) 2023-11-23 08:33:59 +11:00
Joel Challis
bf6f13a2b0
Consolidate some EEPROM Driver configuration (#22321) 2023-10-23 00:37:27 +01:00
Joel Challis
3f1b3a5125
Migrate recently introduced sync items (#22305) 2023-10-21 12:21:23 +01:00
Ryan
c157c19b81
Dedupe I2C, SPI, UART driver inclusions (#22253) 2023-10-13 17:25:32 +11:00
Joel Challis
00feff656f
Migrate WEAR_LEVELING_*_SIZE to info.json (#22010) 2023-09-14 09:13:19 +10:00
Ryan
41bd4e35a0
Clean up RGB LED type (#21859) 2023-09-04 01:19:59 +01:00
Ryan
023d644bb6
Move RGBLight animations to data driven (#21635)
* Move RGBLight animations to data driven, 0-9

* Move RGBLight animations to data driven, A

* Move RGBLight animations to data driven, B

* Move RGBLight animations to data driven, C

* Move RGBLight animations to data driven, D

* Move RGBLight animations to data driven, E

* Move RGBLight animations to data driven, F

* Move RGBLight animations to data driven, G

* Move RGBLight animations to data driven, H

* Move RGBLight animations to data driven, handwired

* Move RGBLight animations to data driven, I

* Move RGBLight animations to data driven, J

* Move RGBLight animations to data driven, K

* Move RGBLight animations to data driven, L

* Move RGBLight animations to data driven, M

* Move RGBLight animations to data driven, N

* Move RGBLight animations to data driven, O

* Move RGBLight animations to data driven, P

* Move RGBLight animations to data driven, Q

* Move RGBLight animations to data driven, R

* Move RGBLight animations to data driven, S

* Move RGBLight animations to data driven, T

* Move RGBLight animations to data driven, U

* Move RGBLight animations to data driven, V

* Move RGBLight animations to data driven, W

* Move RGBLight animations to data driven, X

* Move RGBLight animations to data driven, Y

* Move RGBLight animations to data driven, Z

* Fix incorrect placement

* Fix build failures and mismatches
2023-08-23 22:11:39 +01:00
Ryan
37bc949945
RGB Matrix: driver naming cleanups (#21594) 2023-08-23 01:00:03 +01:00
Ryan
5d2f2af198
OLED: driver naming cleanups (#21710) 2023-08-15 10:30:34 +01:00
Ryan
6018b56c55
Remove old OLED API code (#21651) 2023-07-31 15:43:10 +01:00
Joel Challis
583c688931
Fix encoder map declarations (#21435) 2023-07-03 01:19:52 +01:00