Make sendKbootCommand() accept various command types, not only reset.

This commit is contained in:
László Monda
2017-10-23 01:19:19 +02:00
parent 92ee3b5606
commit ab807cd0c8
5 changed files with 36 additions and 21 deletions

View File

@@ -281,9 +281,9 @@ void jumpToSlaveBootloader(void)
void sendKbootCommand(void)
{
uint8_t i2cAddress = GenericHidInBuffer[1];
KbootDriverState.i2cAddress = i2cAddress;
KbootDriverState.isTransferScheduled = true;
KbootDriverState.phase = 0;
KbootDriverState.i2cAddress = GenericHidInBuffer[2];
KbootDriverState.commandType = GenericHidInBuffer[1];
}
// The main protocol handler function