fix compile warnings, add flash locking

This commit is contained in:
Conor Patrick
2018-10-28 20:09:12 -04:00
parent 707a930d33
commit 5993aa792a
14 changed files with 107 additions and 69 deletions

View File

@@ -36,12 +36,8 @@
int main(int argc, char * argv[])
{
int count = 0;
uint32_t t1 = 0;
uint32_t t2 = 0;
uint32_t accum = 0;
uint32_t dt = 0;
uint8_t hidmsg[64];
uint32_t t1 = 0;
set_logging_mask(
/*0*/
@@ -51,11 +47,11 @@ int main(int argc, char * argv[])
// TAG_WALLET |
TAG_STOR |
// TAG_CP |
TAG_CTAP|
// TAG_CTAP|
// TAG_HID|
/*TAG_U2F|*/
// TAG_PARSE |
//TAG_TIME|
// TAG_TIME|
// TAG_DUMP|
TAG_GREEN|
TAG_RED|
@@ -89,24 +85,18 @@ int main(int argc, char * argv[])
if (usbhid_recv(hidmsg) > 0)
{
t2 = millis();
ctaphid_handle_packet(hidmsg);
accum += millis() - t2;
// printf1(TAG_TIME,"accum: %d\n", (uint32_t)accum);
// printf1(TAG_TIME,"dt: %d\n", t2 - dt);
dt = t2;
memset(hidmsg, 0, sizeof(hidmsg));
}
else
{
/*main_loop_delay();*/
}
ctaphid_check_timeouts();
}
// Should never get here
usbhid_close();
printf("done\n");
printf1(TAG_GREEN, "done\n");
return 0;
}