Extract UsbCommand_Reenumerate() into its own file.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "usb_commands/usb_command_launch_eeprom_transfer_legacy.h"
|
||||
#include "usb_commands/usb_command_get_keyboard_state.h"
|
||||
#include "usb_commands/usb_command_get_debug_info.h"
|
||||
#include "usb_commands/usb_command_reenumerate.h"
|
||||
|
||||
uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH];
|
||||
|
||||
@@ -46,14 +47,6 @@ void SetUsbResponseWord(uint16_t response)
|
||||
|
||||
// Per command protocol command handlers
|
||||
|
||||
void reenumerate(void)
|
||||
{
|
||||
Wormhole.magicNumber = WORMHOLE_MAGIC_NUMBER;
|
||||
Wormhole.enumerationMode = GenericHidInBuffer[1];
|
||||
Wormhole.timeoutMs = *((uint32_t*)(GenericHidInBuffer+2));
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void setTestLed(void)
|
||||
{
|
||||
uint8_t ledState = GenericHidInBuffer[1];
|
||||
@@ -90,7 +83,7 @@ void UsbProtocolHandler(void)
|
||||
UsbCommand_GetProperty();
|
||||
break;
|
||||
case UsbCommandId_Reenumerate:
|
||||
reenumerate();
|
||||
UsbCommand_Reenumerate();
|
||||
break;
|
||||
case UsbCommandId_SetTestLed:
|
||||
setTestLed();
|
||||
|
||||
Reference in New Issue
Block a user