diff --git a/right/src/buspal/command.c b/right/src/buspal/command.c index a22ad99..d5dd11b 100644 --- a/right/src/buspal/command.c +++ b/right/src/buspal/command.c @@ -6,6 +6,8 @@ #if FIXED_BUSPAL_BOOTLOADER #include "microseconds/microseconds.h" #endif +#include "bootloader/wormhole.h" + command_processor_data_t g_commandData; buspal_state_t g_buspalState = kBuspal_Idle; @@ -483,6 +485,10 @@ status_t bootloader_command_pump() handle_write_memory_command(g_commandData.packet, g_commandData.packetLength); g_commandData.state = kCommandState_DataPhaseWrite; + } else if (cmdTag == kCommandTag_Reset) { + Wormhole.magicNumber = WORMHOLE_MAGIC_NUMBER; + Wormhole.enumerationMode = EnumerationMode_NormalKeyboard; + NVIC_SystemReset(); } status = handle_command_internal(g_commandData.packet, g_commandData.packetLength);