fix warnings and compile errors

This commit is contained in:
Conor Patrick 2019-02-26 14:13:29 -05:00
parent 347d0942b1
commit ecf994b647
3 changed files with 8 additions and 5 deletions

View File

@ -30,6 +30,7 @@
// #define DISABLE_CTAPHID_WINK
// #define DISABLE_CTAPHID_CBOR
// #define ENABLE_SERIAL_PRINTING
#if defined(SOLO_HACKER)
#define SOLO_PRODUCT_NAME "Solo Hacker " SOLO_VERSION

View File

@ -444,7 +444,7 @@ void nfc_process_iblock(uint8_t * buf, int len)
else
{
nfc_write_response(buf[0], SW_FILE_NOT_FOUND);
printf1(TAG_NFC, "NOT selected\r\n"); dump_hex1(TAG_NFC,res, 3);
printf1(TAG_NFC, "NOT selected\r\n"); dump_hex1(TAG_NFC,payload, plen);
}
}
break;
@ -495,7 +495,7 @@ void nfc_process_iblock(uint8_t * buf, int len)
printf1(TAG_NFC,"U2F Register answered %d (took %d)\r\n", millis(), millis() - t1);
printf1(TAG_NFC,"U2F Register answered %d (took %d)\r\n", millis(), timestamp());
break;
case APDU_FIDO_U2F_AUTHENTICATE:
@ -532,8 +532,7 @@ void nfc_process_iblock(uint8_t * buf, int len)
break;
}
timestamp();
printf1(TAG_NFC, "FIDO2 CTAP message. %d\r\n", t1);
printf1(TAG_NFC, "FIDO2 CTAP message. %d\r\n", timestamp());
WTX_on(WTX_TIME_DEFAULT);
ctap_response_init(&ctap_resp);

View File

@ -24,7 +24,7 @@ void _putchar(char c)
}
int _write (int fd, const void *buf, long int len)
int _write (int fd, const void *buf, unsigned long int len)
{
uint8_t * data = (uint8_t *) buf;
#if DEBUG_LEVEL>1
@ -43,11 +43,14 @@ int _write (int fd, const void *buf, long int len)
if (res == USBD_OK)
logbuflen = 0;
#endif
#ifdef ENABLE_SERIAL_PRINTING
// Send out UART serial
while(len--)
{
_putchar(*data++);
}
#endif
return 0;
}
#endif