summaryrefslogtreecommitdiff
path: root/src/portable/raspberrypi
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-16 01:19:51 +0700
committerhathach <[email protected]>2022-04-16 01:19:51 +0700
commitb5a9537eea81bd6ffd8d575dbd2b5823c2fc1f0e (patch)
tree3ae12ce50798d8bbab1d53daa362bc4c88d6dafa /src/portable/raspberrypi
parent00a0e3f21ba588f892022159e435938b48305b99 (diff)
support pio dcd endpiont stall
Diffstat (limited to 'src/portable/raspberrypi')
-rw-r--r--src/portable/raspberrypi/pio_usb/dcd_pio_usb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
index dc9cbb45b..7744a11cd 100644
--- a/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
+++ b/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
@@ -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;
}
//--------------------------------------------------------------------+