diff --git a/left/src/slave_protocol_handler.c b/left/src/slave_protocol_handler.c index 7f8993c..553b566 100644 --- a/left/src/slave_protocol_handler.c +++ b/left/src/slave_protocol_handler.c @@ -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; } } diff --git a/shared/slave_protocol.h b/shared/slave_protocol.h index 530a7cb..ac95cbb 100644 --- a/shared/slave_protocol.h +++ b/shared/slave_protocol.h @@ -7,6 +7,7 @@ SlaveCommand_GetKeyStates, SlaveCommand_SetTestLed, SlaveCommand_SetLedPwmBrightness, + SlaveCommand_JumpToBootloader, } slave_command_t; #endif