summaryrefslogtreecommitdiff
path: root/src/portable/raspberrypi
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-18 17:49:21 +0700
committerhathach <[email protected]>2022-04-18 17:49:21 +0700
commita32cb1bb93ce986af9ed83f5d378c26bb4df2b1e (patch)
tree137bf3e80a48f096c3b3f00570bb07fa86d09117 /src/portable/raspberrypi
parentb5a9537eea81bd6ffd8d575dbd2b5823c2fc1f0e (diff)
clean up pio driver
Diffstat (limited to 'src/portable/raspberrypi')
-rw-r--r--src/portable/raspberrypi/pio_usb/dcd_pio_usb.c7
-rw-r--r--src/portable/raspberrypi/pio_usb/hcd_pio_usb.c6
2 files changed, 7 insertions, 6 deletions
diff --git a/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
index 7744a11cd..38867ea1c 100644
--- a/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
+++ b/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c
@@ -78,7 +78,7 @@ void dcd_set_address (uint8_t rhport, uint8_t dev_addr)
// must be called before queuing status
pio_usb_device_set_address(pio_rhport, dev_addr);
- pio_usb_device_endpoint_transfer(pio_rhport, 0x80, NULL, 0);
+ dcd_edpt_xfer(rhport, 0x80, NULL, 0);
}
// Wake up host
@@ -118,8 +118,9 @@ void dcd_edpt_close_all (uint8_t rhport)
// Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
{
- uint8_t const pio_rhport = RHPORT_PIO(rhport);
- return pio_usb_device_endpoint_transfer(pio_rhport, ep_addr, buffer, total_bytes);
+ (void) rhport;
+ pio_hw_endpoint_t *ep = pio_usb_device_get_ep(ep_addr);
+ return pio_usb_endpoint_transfer(ep, buffer, total_bytes);
}
// Submit a transfer where is managed by FIFO, When complete dcd_event_xfer_complete() is invoked to notify the stack - optional, however, must be listed in usbd.c
diff --git a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
index 4bd318448..e311f16d0 100644
--- a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
+++ b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
@@ -51,7 +51,7 @@ static pio_usb_configuration_t pio_host_config = PIO_USB_DEFAULT_CONFIG;
bool hcd_init(uint8_t rhport)
{
// To run USB SOF interrupt in core1, call this init in core1
- pio_usb_host_controller_init(&pio_host_config);
+ pio_usb_host_init(&pio_host_config);
return true;
}
@@ -59,13 +59,13 @@ bool hcd_init(uint8_t rhport)
void hcd_port_reset(uint8_t rhport)
{
rhport = RHPORT_PIO(rhport);
- pio_usb_hw_port_reset_start(rhport);
+ pio_usb_host_port_reset_start(rhport);
}
void hcd_port_reset_end(uint8_t rhport)
{
rhport = RHPORT_PIO(rhport);
- pio_usb_hw_port_reset_end(rhport);
+ pio_usb_host_port_reset_end(rhport);
}
bool hcd_port_connect_status(uint8_t rhport)