allocate cids better and do proper timeouts in hid

This commit is contained in:
Conor Patrick
2018-05-28 14:14:59 -04:00
parent 87429fb8a6
commit 9c42823cd2
10 changed files with 342 additions and 148 deletions

11
main.c
View File

@@ -50,11 +50,14 @@ int main(int argc, char * argv[])
while(1)
{
usbhid_recv(hidmsg);
printf("%d>> ",count++); dump_hex(hidmsg,sizeof(hidmsg));
if (usbhid_recv(hidmsg) > 0)
{
printf("%d>> ",count++); dump_hex(hidmsg,sizeof(hidmsg));
ctaphid_handle_packet(hidmsg);
memset(hidmsg, 0, sizeof(hidmsg));
ctaphid_handle_packet(hidmsg);
memset(hidmsg, 0, sizeof(hidmsg));
}
u2f_hid_check_timeouts();
}