fix reboot
This commit is contained in:
parent
a95e62e2ea
commit
c972a13034
@ -30,6 +30,7 @@ void main_loop_delay();
|
||||
|
||||
void heartbeat();
|
||||
|
||||
void device_reboot();
|
||||
|
||||
void authenticator_read_state(AuthenticatorState * );
|
||||
|
||||
|
@ -43,7 +43,11 @@ void device_set_status(uint32_t status)
|
||||
__device_status = status;
|
||||
}
|
||||
|
||||
|
||||
void device_reboot()
|
||||
{
|
||||
printf1(TAG_RED, "REBOOT command recieved!\r\n");
|
||||
exit(100);
|
||||
}
|
||||
|
||||
int udp_server()
|
||||
{
|
||||
|
@ -757,10 +757,10 @@ void apdu_process(uint8_t buf0, uint8_t *apduptr, APDU_STRUCT *apdu)
|
||||
break;
|
||||
|
||||
case APDU_SOLO_RESET:
|
||||
if (apdu.lc == 18 && !memcmp(apdu.data, "Reset solo please>", 18)) {
|
||||
if (apdu.lc == 4 && !memcmp(apdu.data, "\x12\x56\xab\xf0", 4)) {
|
||||
printf1(TAG_NFC, "Reset...\r\n");
|
||||
delay(10);
|
||||
NVIC_SystemReset();
|
||||
device_reboot();
|
||||
while(1);
|
||||
} else {
|
||||
printf1(TAG_NFC, "Reset FAIL\r\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user