summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-26 18:47:09 +0700
committerhathach <[email protected]>2022-04-26 18:47:09 +0700
commit455bddddcd051acd6d62bca97783be04fc508e96 (patch)
tree0f6b141b53550203b70572a980ebde214b1ecb56
parent4d11c658fffa810f271fdafb6453eff1f2b77b3f (diff)
minor clean up
m---------lib/Pico-PIO-USB0
-rw-r--r--src/portable/raspberrypi/pio_usb/dcd_pio_usb.c9
-rw-r--r--src/portable/raspberrypi/pio_usb/hcd_pio_usb.c3
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/Pico-PIO-USB b/lib/Pico-PIO-USB
-Subproject d2c70ae7b6a122027b7c5c9aa4769fab19e8e88
+Subproject 125753a9783bc1724a185770b04f83c4ebd4b6c
diff --git a/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
index 77f34238a..3daa39a8b 100644
--- a/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
+++ b/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
@@ -152,7 +152,7 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr)
//
//--------------------------------------------------------------------+
-static void __no_inline_not_in_flash_func(handle_endpoint_irq)(root_port_t* rport, xfer_result_t result, volatile uint32_t* ep_reg)
+static void __no_inline_not_in_flash_func(handle_endpoint_irq)(uint8_t tu_rhport, xfer_result_t result, volatile uint32_t* ep_reg)
{
const uint32_t ep_all = *ep_reg;
@@ -163,7 +163,6 @@ static void __no_inline_not_in_flash_func(handle_endpoint_irq)(root_port_t* rpor
if (ep_all & mask)
{
endpoint_t* ep = PIO_USB_ENDPOINT(ep_idx);
- uint8_t const tu_rhport = rport - PIO_USB_ROOT_PORT(0) + 1;
dcd_event_xfer_complete(tu_rhport, ep->ep_num, ep->actual_len, result, true);
}
}
@@ -191,17 +190,17 @@ void __no_inline_not_in_flash_func(pio_usb_device_irq_handler)(uint8_t root_id)
if ( ints & PIO_USB_INTS_ENDPOINT_COMPLETE_BITS )
{
- handle_endpoint_irq(rport, XFER_RESULT_SUCCESS, &rport->ep_complete);
+ handle_endpoint_irq(tu_rhport, XFER_RESULT_SUCCESS, &rport->ep_complete);
}
if ( ints & PIO_USB_INTS_ENDPOINT_STALLED_BITS )
{
- handle_endpoint_irq(rport, XFER_RESULT_STALLED, &rport->ep_stalled);
+ handle_endpoint_irq(tu_rhport, XFER_RESULT_STALLED, &rport->ep_stalled);
}
if ( ints & PIO_USB_INTS_ENDPOINT_ERROR_BITS )
{
- handle_endpoint_irq(rport, XFER_RESULT_FAILED, &rport->ep_error);
+ handle_endpoint_irq(tu_rhport, XFER_RESULT_FAILED, &rport->ep_error);
}
// clear all
diff --git a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
index 8101fb2d3..f6caabb54 100644
--- a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
+++ b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
@@ -157,8 +157,9 @@ bool hcd_edpt_clear_stall(uint8_t dev_addr, uint8_t ep_addr)
return true;
}
-static void __no_inline_not_in_flash_func(handle_endpoint_irq)(root_port_t* port, xfer_result_t result, volatile uint32_t* ep_reg)
+static void __no_inline_not_in_flash_func(handle_endpoint_irq)(root_port_t* rport, xfer_result_t result, volatile uint32_t* ep_reg)
{
+ (void) rport;
const uint32_t ep_all = *ep_reg;
for(uint8_t ep_idx = 0; ep_idx < PIO_USB_EP_POOL_CNT; ep_idx++)