make device_info.ino Arduino sketch applicable for Pico W

This commit is contained in:
Linar Yusupov 2023-04-17 07:42:59 +03:00 committed by GitHub
parent 9f73822481
commit d77166a3e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,6 +54,17 @@ void setup1() {
pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG;
pio_cfg.pin_dp = HOST_PIN_DP;
#if defined(ARDUINO_RASPBERRY_PI_PICO_W)
/* https://github.com/sekigon-gonnoc/Pico-PIO-USB/issues/46 */
pio_cfg.sm_tx = 3;
pio_cfg.sm_rx = 2;
pio_cfg.sm_eop = 3;
pio_cfg.pio_rx_num = 0;
pio_cfg.pio_tx_num = 1;
pio_cfg.tx_ch = 9;
#endif /* ARDUINO_RASPBERRY_PI_PICO_W */
USBHost.configure_pio_usb(1, &pio_cfg);
// run host stack on controller (rhport) 1