mirror of
https://github.com/moparisthebest/tmk_keyboard
synced 2024-11-14 21:35:05 -05:00
17 lines
406 B
C
17 lines
406 B
C
#include "stdint.h"
|
|
#include "ps2.h"
|
|
#include "led.h"
|
|
|
|
|
|
void led_set(uint8_t usb_led)
|
|
{
|
|
uint8_t ps2_led = 0;
|
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
|
ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
|
|
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
|
ps2_led |= (1<<PS2_LED_NUM_LOCK);
|
|
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
|
ps2_led |= (1<<PS2_LED_CAPS_LOCK);
|
|
ps2_host_set_led(ps2_led);
|
|
}
|