Handle SlaveCommand_JumpToBootloader
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "init_peripherals.h"
|
#include "init_peripherals.h"
|
||||||
#include "bool_array_converter.h"
|
#include "bool_array_converter.h"
|
||||||
|
#include "kboot.h"
|
||||||
|
|
||||||
void SetError(uint8_t error);
|
void SetError(uint8_t error);
|
||||||
void SetGenericError(void);
|
void SetGenericError(void);
|
||||||
@@ -39,7 +40,7 @@ void SlaveProtocolHandler(void)
|
|||||||
break;
|
break;
|
||||||
case SlaveCommand_SetTestLed:
|
case SlaveCommand_SetTestLed:
|
||||||
SlaveTxSize = 0;
|
SlaveTxSize = 0;
|
||||||
bool isLedOn = SlaveRxBuffer[1];
|
// bool isLedOn = SlaveRxBuffer[1];
|
||||||
// TEST_LED_SET(isLedOn);
|
// TEST_LED_SET(isLedOn);
|
||||||
break;
|
break;
|
||||||
case SlaveCommand_SetLedPwmBrightness:
|
case SlaveCommand_SetLedPwmBrightness:
|
||||||
@@ -47,5 +48,8 @@ void SlaveProtocolHandler(void)
|
|||||||
uint8_t brightnessPercent = SlaveRxBuffer[1];
|
uint8_t brightnessPercent = SlaveRxBuffer[1];
|
||||||
LedPwm_SetBrightness(brightnessPercent);
|
LedPwm_SetBrightness(brightnessPercent);
|
||||||
break;
|
break;
|
||||||
|
case SlaveCommand_JumpToBootloader:
|
||||||
|
JumpToKboot();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
SlaveCommand_GetKeyStates,
|
SlaveCommand_GetKeyStates,
|
||||||
SlaveCommand_SetTestLed,
|
SlaveCommand_SetTestLed,
|
||||||
SlaveCommand_SetLedPwmBrightness,
|
SlaveCommand_SetLedPwmBrightness,
|
||||||
|
SlaveCommand_JumpToBootloader,
|
||||||
} slave_command_t;
|
} slave_command_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user