Add the GetKeyboardState USB command.
This commit is contained in:
@@ -155,6 +155,11 @@ void writeConfiguration(bool isHardware)
|
||||
memcpy(buffer+offset, GenericHidInBuffer+1+1+2, length);
|
||||
}
|
||||
|
||||
void getKeyboardState(void)
|
||||
{
|
||||
GenericHidOutBuffer[1] = IsEepromBusy;
|
||||
}
|
||||
|
||||
// The main protocol handler function
|
||||
|
||||
void usbProtocolHandler(void)
|
||||
@@ -200,6 +205,9 @@ void usbProtocolHandler(void)
|
||||
case UsbCommand_ReadUserConfiguration:
|
||||
readConfiguration(false);
|
||||
break;
|
||||
case UsbCommand_GetKeyboardState:
|
||||
getKeyboardState();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
UsbCommand_ReadHardwareConfiguration = 13,
|
||||
UsbCommand_WriteHardwareConfiguration = 14,
|
||||
UsbCommand_ReadUserConfiguration = 15,
|
||||
UsbCommand_GetKeyboardState = 16,
|
||||
} usb_command_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user