Hi All!
I use Example Project from SDK: "examples\peripheral\usbd\" as reference to implement my HID device simple protocol (EP1IN / EP1OUT 64bytes)
The Question is how to sent ACK/NACK/STALL for USB protocol OUT stage after I receive "NRF_DRV_USBD_EVT_EPTRANSFER" Event ?
when i accept NRF_DRV_USBD_EVT_EPTRANSFER success, PC (HOST) should to received ACK/NACK or STALL from DEvice , but now PC (HOST) side goes to HUNG state. because seems no ACK/NACK frame send from Device.
the CODE:
case NRF_DRV_USBD_EVT_EPTRANSFER:
if (NRF_DRV_USBD_EPOUT1 == p_event->data.eptransfer.ep)
{ // RECEIVED OK!
muENV.cnt_ep1_out++; // debug counter
muENV.ep1out_rcvd = 1; // OK flag
// ... how to send ACK/NACK/STALL ???
}
//...
break;
Thanks you!