cb39df273de782be1145dc5184bfd47d823531d5

Author
Joel Challis <git@zvecr.com>
Committer
GitHub <noreply@github.com>
Date

Message

Remove deprecated `led_set_user` (#23979)

Diff

This diff is truncated to protect this page.

 1diff --git a/docs/features/led_indicators.md b/docs/features/led_indicators.md
 2index 8435c69a5526dc67edde0471bb78c3044cef1fb1..211fda258155bc158bead5acc191079665ea21be 100644
 3--- a/docs/features/led_indicators.md
 4+++ b/docs/features/led_indicators.md
 5@@ -21,9 +21,8 @@ There are three ways to get the lock LED state:
 6 The `host_keyboard_led_state()` may reflect an updated state before `led_update_user()` is called.
 7 :::
 8 
 9-Two deprecated functions that provide the LED state as `uint8_t`:
10+Deprecated functions that provide the LED state as `uint8_t`:
11 
12-* `uint8_t led_set_user(uint8_t usb_led)`
13 * `uint8_t host_keyboard_leds()`
14 
15 ## Configuration Options
16@@ -50,10 +49,6 @@ When the configuration options do not provide enough flexibility, the following
17 
18diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp
19index ca0855a82b9f6dbcb2dc47213fea813a4716ffc5..e1ef695570714c76d3a4fcb653ce941be52226ad 100644
20--- a/keyboards/converter/usb_usb/custom_matrix.cpp
21+++ b/keyboards/converter/usb_usb/custom_matrix.cpp
22@@ -229,7 +229,6 @@ extern "C" {
23         if (kbd2.isReady()) kbd2.SetReport(0, 0, 2, 0, 1, &usb_led);
24         if (kbd3.isReady()) kbd3.SetReport(0, 0, 2, 0, 1, &usb_led);
25         if (kbd4.isReady()) kbd4.SetReport(0, 0, 2, 0, 1, &usb_led);
26-        led_set_user(usb_led);
27         led_update_kb((led_t){.raw = usb_led});
28     }
29 }
30diff --git a/keyboards/sirius/unigo66/custom_matrix.cpp b/keyboards/sirius/unigo66/custom_matrix.cpp
31index 25648a5f78e2e37e518a527eda400a30225af8f3..879a0e7c153416d3a6d7e1dbab31ba853f941f62 100644
32--- a/keyboards/sirius/unigo66/custom_matrix.cpp
33+++ b/keyboards/sirius/unigo66/custom_matrix.cpp
34@@ -216,7 +216,6 @@ extern "C"
35         kbd2.SetReport(0, 0, 2, 0, 1, &usb_led);
36         kbd3.SetReport(0, 0, 2, 0, 1, &usb_led);
37         kbd4.SetReport(0, 0, 2, 0, 1, &usb_led);
38-        led_set_user(usb_led);
39         led_update_kb((led_t){.raw = usb_led});
40     }
41 
42diff --git a/quantum/led.c b/quantum/led.c
43index e2b598510997a1678bdf17f34d744e4b956c1f73..aec3edc8235c24fac3644038d009ff1dcc7cbc1a 100644
44--- a/quantum/led.c
45+++ b/quantum/led.c
46@@ -56,19 +56,15 @@ static void handle_backlight_caps_lock(led_t led_state) {
47 #endif
48 
49 static uint32_t last_led_modification_time = 0;
50-uint32_t        last_led_activity_time(void) {
51+
52+uint32_t last_led_activity_time(void) {
53     return last_led_modification_time;
54 }
55+
56 uint32_t last_led_activity_elapsed(void) {
57     return timer_elapsed32(last_led_modification_time);
58 }
59 
60-/** \brief Lock LED set callback - keymap/user level
61- *
62- * \deprecated Use led_update_user() instead.
63- */
64-__attribute__((weak)) void led_set_user(uint8_t usb_led) {}
65-
66 /** \brief Lock LED update callback - keymap/user level
67  *
68  * \return True if led_update_kb() should run its own code, false otherwise.
69@@ -146,7 +142,6 @@ __attribute__((weak)) void led_set(uint8_t usb_led) {
70     handle_backlight_caps_lock((led_t)usb_led);
71 #endif
72 
73-    led_set_user(usb_led);
74     led_update_kb((led_t)usb_led);
75 }
76 
77diff --git a/quantum/led.h b/quantum/led.h
78index b9fad670aeba6aa41bbaf44a5135e469cebb1652..669e93e1944114b75d69d76afbdcd29aeaa1b9a5 100644
79--- a/quantum/led.h
80+++ b/quantum/led.h
81@@ -48,9 +48,6 @@ void led_wakeup(void);
82 
83 void led_task(void);
84 
85-/* Deprecated callbacks */
86-void led_set_user(uint8_t usb_led);
87-
88 /* Callbacks */
89 bool led_update_user(led_t led_state);
90 bool led_update_kb(led_t led_state);