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);
|
memcpy(buffer+offset, GenericHidInBuffer+1+1+2, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getKeyboardState(void)
|
||||||
|
{
|
||||||
|
GenericHidOutBuffer[1] = IsEepromBusy;
|
||||||
|
}
|
||||||
|
|
||||||
// The main protocol handler function
|
// The main protocol handler function
|
||||||
|
|
||||||
void usbProtocolHandler(void)
|
void usbProtocolHandler(void)
|
||||||
@@ -200,6 +205,9 @@ void usbProtocolHandler(void)
|
|||||||
case UsbCommand_ReadUserConfiguration:
|
case UsbCommand_ReadUserConfiguration:
|
||||||
readConfiguration(false);
|
readConfiguration(false);
|
||||||
break;
|
break;
|
||||||
|
case UsbCommand_GetKeyboardState:
|
||||||
|
getKeyboardState();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
UsbCommand_ReadHardwareConfiguration = 13,
|
UsbCommand_ReadHardwareConfiguration = 13,
|
||||||
UsbCommand_WriteHardwareConfiguration = 14,
|
UsbCommand_WriteHardwareConfiguration = 14,
|
||||||
UsbCommand_ReadUserConfiguration = 15,
|
UsbCommand_ReadUserConfiguration = 15,
|
||||||
|
UsbCommand_GetKeyboardState = 16,
|
||||||
} usb_command_t;
|
} usb_command_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
Reference in New Issue
Block a user