diff options
| author | hathach <[email protected]> | 2022-06-08 01:17:01 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-06-08 01:17:01 +0700 |
| commit | 8cbc34de11ccaaf0831cda14ad703d8d962ae725 (patch) | |
| tree | b14945c476a57c3dcbed6c372d882cba47a0fdca /src/portable/raspberrypi | |
| parent | 896c707cd4e0a07fcfc105e793ede134398f290b (diff) | |
add tuh_configure() for port/dynamic host behavior config
Diffstat (limited to 'src/portable/raspberrypi')
| -rw-r--r-- | src/portable/raspberrypi/pio_usb/hcd_pio_usb.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c index 1b2d29331..58b153ac3 100644 --- a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c +++ b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c @@ -43,17 +43,25 @@ #define RHPORT_OFFSET 1 #define RHPORT_PIO(_x) ((_x)-RHPORT_OFFSET) -static pio_usb_configuration_t pio_host_config = PIO_USB_DEFAULT_CONFIG; +static pio_usb_configuration_t pio_host_cfg = PIO_USB_DEFAULT_CONFIG; //--------------------------------------------------------------------+ // HCD API //--------------------------------------------------------------------+ +bool hcd_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param) +{ + (void) rhport; + TU_VERIFY(cfg_id == TUH_CFGID_RPI_PIO_USB_CONFIGURATION); + memcpy(&pio_host_cfg, cfg_param, sizeof(pio_usb_configuration_t)); + return true; +} + bool hcd_init(uint8_t rhport) { (void) rhport; // To run USB SOF interrupt in core1, call this init in core1 - pio_usb_host_init(&pio_host_config); + pio_usb_host_init(&pio_host_cfg); return true; } |
