Handle SlaveCommand_JumpToBootloader
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
SlaveCommand_GetKeyStates,
|
||||
SlaveCommand_SetTestLed,
|
||||
SlaveCommand_SetLedPwmBrightness,
|
||||
SlaveCommand_JumpToBootloader,
|
||||
} slave_command_t;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user