diff --git a/firmware/keyboard.c b/firmware/keyboard.c index 651eb6d..2098d39 100644 --- a/firmware/keyboard.c +++ b/firmware/keyboard.c @@ -21,6 +21,7 @@ #define CMD_IEEREAD 8 // int. eep. #define CMD_SETBLOCK 9 #define CMD_SETLED 10 +#define CMD_GETLED 11 #define CMD_SETBRIGHTNESS 12 #define CMD_GETBRIGHTNESS 13 @@ -123,6 +124,12 @@ USB_PUBLIC uchar usbFunctionSetup(uchar data[8]) led[rq->wValue.bytes[0]].b = rq->wIndex.bytes[1]; return 0; } + else if (rq->bRequest == CMD_GETLED) { + reportBuffer[0] = led[rq->wValue.bytes[0]].r; + reportBuffer[1] = led[rq->wValue.bytes[0]].g; + reportBuffer[2] = led[rq->wValue.bytes[0]].b; + return 3; + } return 0; }