Handle SlaveCommand_JumpToBootloader

This commit is contained in:
László Monda
2017-09-22 01:17:58 +02:00
parent cc3208a947
commit 5dd3b8e0be
2 changed files with 6 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
#include "main.h"
#include "init_peripherals.h"
#include "bool_array_converter.h"
#include "kboot.h"
void SetError(uint8_t error);
void SetGenericError(void);
@@ -39,7 +40,7 @@ void SlaveProtocolHandler(void)
break;
case SlaveCommand_SetTestLed:
SlaveTxSize = 0;
bool isLedOn = SlaveRxBuffer[1];
// bool isLedOn = SlaveRxBuffer[1];
// TEST_LED_SET(isLedOn);
break;
case SlaveCommand_SetLedPwmBrightness:
@@ -47,5 +48,8 @@ void SlaveProtocolHandler(void)
uint8_t brightnessPercent = SlaveRxBuffer[1];
LedPwm_SetBrightness(brightnessPercent);
break;
case SlaveCommand_JumpToBootloader:
JumpToKboot();
break;
}
}

View File

@@ -7,6 +7,7 @@
SlaveCommand_GetKeyStates,
SlaveCommand_SetTestLed,
SlaveCommand_SetLedPwmBrightness,
SlaveCommand_JumpToBootloader,
} slave_command_t;
#endif