ctap/u2f works on nrf52

This commit is contained in:
Conor Patrick
2018-06-02 18:30:59 -04:00
parent a71c9ef30a
commit 28b6305b4c
7 changed files with 58 additions and 16 deletions

View File

@@ -187,7 +187,8 @@ void usbhid_send(uint8_t * msg)
static nrf_drv_usbd_transfer_t transfer;
transfer.p_data.tx = msg;
transfer.size = 64;
while (nrf_drv_usbd_ep_is_busy(NRF_DRV_USBD_EPIN1))
;
nrf_drv_usbd_ep_transfer(
NRF_DRV_USBD_EPIN1,
&transfer);
@@ -214,7 +215,7 @@ void heartbeat()
void ctaphid_write_block(uint8_t * data)
{
printf("<< "); dump_hex(data, 64);
printf1(TAG_DUMP,"<< "); dump_hex1(TAG_DUMP,data, 64);
usbhid_send(data);
}

View File

@@ -933,7 +933,7 @@ static void usbd_event_handler(nrf_drv_usbd_evt_t const * const p_event)
}
else
{
printf("EP other: %d\n", p_event->data.eptransfer.ep);
/*printf("EP other: %d\n", p_event->data.eptransfer.ep);*/
/* Nothing to do */
}
break;