File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
15
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
*/
17
17
18
+ #include "keyboard.h"
18
19
#include "hooks.h"
19
20
20
21
/* -------------------------------------------------
@@ -44,7 +45,7 @@ void matrix_change_hook(keyevent_t event) {
44
45
/* Default behaviour: calls led_set (for compatibility). */
45
46
__attribute__((weak ))
46
47
void led_update_hook (uint8_t led_status ) {
47
- led_set (led_status );
48
+ keyboard_set_leds (led_status );
48
49
}
49
50
50
51
/* Called when indicator LEDs need updating from firmware. */
Original file line number Diff line number Diff line change @@ -85,4 +85,4 @@ void led_update_hook(uint8_t led_status);
85
85
/* Default behaviour: calls led_set (for compatibility). */
86
86
void led_restore_hook (uint8_t led_status );
87
87
88
- #endif /* _HOOKS_H_ */
88
+ #endif /* _HOOKS_H_ */
Original file line number Diff line number Diff line change @@ -169,12 +169,12 @@ void keyboard_task(void)
169
169
// update LED
170
170
if (led_status != host_keyboard_leds ()) {
171
171
led_status = host_keyboard_leds ();
172
- keyboard_set_leds (led_status );
172
+ if (debug_keyboard ) dprintf ("LED: %02X\n" , led_status );
173
+ led_update_hook (led_status );
173
174
}
174
175
}
175
176
176
177
void keyboard_set_leds (uint8_t leds )
177
178
{
178
- if (debug_keyboard ) { debug ("keyboard_set_led: " ); debug_hex8 (leds ); debug ("\n" ); }
179
- led_update_hook (leds );
179
+ led_set (leds );
180
180
}
You can’t perform that action at this time.
0 commit comments