Make reenumerate() set Wormhole.timeoutMs based on GenericHidInBuffer+2

This commit is contained in:
László Monda
2017-10-16 23:26:37 +02:00
parent 53cb8aa129
commit b3e025f443
2 changed files with 2 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ void reenumerate(void)
{
Wormhole.magicNumber = WORMHOLE_MAGIC_NUMBER;
Wormhole.enumerationMode = GenericHidInBuffer[1];
Wormhole.timeoutMs = *((uint32_t*)(GenericHidInBuffer+2));
SCB->AIRCR = 0x5FA<<SCB_AIRCR_VECTKEY_Pos | SCB_AIRCR_SYSRESETREQ_Msk; // Reset the MCU.
for (;;);
}