add hcd abort xfer for rp2040 pio usb

This commit is contained in:
hathach 2023-07-24 11:55:54 +07:00
parent c122e9df73
commit f295aaf185
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
3 changed files with 9 additions and 12 deletions

View File

@ -54,19 +54,19 @@
// default to pin on Adafruit Feather rp2040 USB Host or Tester if defined // default to pin on Adafruit Feather rp2040 USB Host or Tester if defined
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// #define USE_ADAFRUIT_RP2040_TESTER // #define USE_ADAFRUIT_FEATHER_RP2040_USBHOST
#ifdef USE_ADAFRUIT_RP2040_TESTER #ifdef USE_ADAFRUIT_FEATHER_RP2040_USBHOST
#define PICO_DEFAULT_PIO_USB_DP_PIN 20 #define PICO_DEFAULT_PIO_USB_DP_PIN 16
#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 22 #define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 18
#endif #endif
#ifndef PICO_DEFAULT_PIO_USB_DP_PIN #ifndef PICO_DEFAULT_PIO_USB_DP_PIN
#define PICO_DEFAULT_PIO_USB_DP_PIN 16 #define PICO_DEFAULT_PIO_USB_DP_PIN 20
#endif #endif
// VBUS enable pin and its active state // VBUS enable pin and its active state
#ifndef PICO_DEFAULT_PIO_USB_VBUSEN_PIN #ifndef PICO_DEFAULT_PIO_USB_VBUSEN_PIN
#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 18 #define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 22
#endif #endif
// VBUS enable state // VBUS enable state

View File

@ -139,11 +139,8 @@ bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t *
} }
bool hcd_edpt_abort_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) { bool hcd_edpt_abort_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) {
(void) rhport; uint8_t const pio_rhport = RHPORT_PIO(rhport);
(void) dev_addr; return pio_usb_host_endpoint_abort_transfer(pio_rhport, dev_addr, ep_addr);
(void) ep_addr;
// TODO not implemented yet
return false;
} }
bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8]) bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8])

View File

@ -54,7 +54,7 @@ deps_optional = {
'950819b7de9b32f92c3edf396bc5ffb8d66e7009', '950819b7de9b32f92c3edf396bc5ffb8d66e7009',
'kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'], 'kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'],
'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git', 'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git',
'58879cfa0eca5725d8db6443ec17f8896a321042', 'd00a10a8c425d0d40f81b87169102944b01f3bb3',
'rp2040'], 'rp2040'],
'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git', 'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git',
'8dc14709f2a6518b43f71efad70d900b7718d9f1', '8dc14709f2a6518b43f71efad70d900b7718d9f1',