add response to reset command and delete debug

This commit is contained in:
merlokk 2019-08-22 17:43:11 +03:00 committed by Conor Patrick
parent 8973608f59
commit 3fad9a7a7d

View File

@ -703,9 +703,6 @@ void apdu_process(uint8_t buf0, uint8_t *apduptr, APDU_STRUCT *apdu)
// WTX_on(WTX_TIME_DEFAULT); // WTX_on(WTX_TIME_DEFAULT);
request_from_nfc(true); request_from_nfc(true);
ctap_response_init(&ctap_resp); ctap_response_init(&ctap_resp);
delay(1);
printf1(TAG_NFC,"[%d] ", apdu->lc);
dump_hex1(TAG_NFC, apdu->data, apdu->lc);
status = ctap_request(apdu->data, apdu->lc, &ctap_resp); status = ctap_request(apdu->data, apdu->lc, &ctap_resp);
request_from_nfc(false); request_from_nfc(false);
// if (!WTX_off()) // if (!WTX_off())
@ -759,7 +756,8 @@ void apdu_process(uint8_t buf0, uint8_t *apduptr, APDU_STRUCT *apdu)
case APDU_SOLO_RESET: case APDU_SOLO_RESET:
if (apdu->lc == 4 && !memcmp(apdu->data, "\x12\x56\xab\xf0", 4)) { if (apdu->lc == 4 && !memcmp(apdu->data, "\x12\x56\xab\xf0", 4)) {
printf1(TAG_NFC, "Reset...\r\n"); printf1(TAG_NFC, "Reset...\r\n");
delay(10); nfc_write_response(buf0, SW_SUCCESS);
delay(20);
device_reboot(); device_reboot();
while(1); while(1);
} else { } else {