support pio dcd endpiont stall

This commit is contained in:
hathach 2022-04-16 01:19:51 +07:00
parent 00a0e3f21b
commit b5a9537eea
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
2 changed files with 6 additions and 3 deletions

@ -1 +1 @@
Subproject commit ed84b4de88e7c22bb56cb53bf85f1a2c5dd8b8fc
Subproject commit d6712cad5bfbddb25647974f0d583596e703c06f

View File

@ -136,14 +136,17 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr)
{
(void) rhport;
(void) ep_addr;
pio_hw_endpoint_t *ep = pio_usb_device_get_ep(ep_addr);
ep->stalled = true;
}
// clear stall, data toggle is also reset to DATA0
void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr)
{
(void) rhport;
(void) ep_addr;
pio_hw_endpoint_t *ep = pio_usb_device_get_ep(ep_addr);
ep->data_id = 0;
ep->stalled = false;
}
//--------------------------------------------------------------------+