1
0
Fork 0

Get rid of USB_LED_SCROLL_LOCK (#21405)

This commit is contained in:
Ryan 2023-07-03 04:24:22 +10:00 committed by GitHub
parent 9dbad1fa5c
commit 7ff80a57cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 399 additions and 479 deletions

View file

@ -20,14 +20,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "led.h"
void led_set(uint8_t usb_led)
bool led_update_kb(led_t led_state)
{
uint8_t ps2_led = 0;
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
if (led_state.scroll_lock)
ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
if (usb_led & (1<<USB_LED_NUM_LOCK))
if (led_state.num_lock)
ps2_led |= (1<<PS2_LED_NUM_LOCK);
if (usb_led & (1<<USB_LED_CAPS_LOCK))
if (led_state.caps_lock)
ps2_led |= (1<<PS2_LED_CAPS_LOCK);
ps2_host_set_led(ps2_led);
return false;
}