Skip to content

Commit e37f6ae

Browse files
committed
[RP2350] clean up build for USB host
1 parent fa57a48 commit e37f6ae

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

software/firmware/source/SoftRF/src/platform/RP2XXX.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -1382,15 +1382,13 @@ void setup1() {
13821382
pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG;
13831383
pio_cfg.pin_dp = SOC_GPIO_PIN_USBH_DP;
13841384

1385-
#if defined(ARDUINO_RASPBERRY_PI_PICO_W)
1385+
#if defined(ARDUINO_RASPBERRY_PI_PICO_W) || defined(ARDUINO_RASPBERRY_PI_PICO_2W)
13861386
pio_cfg.sm_tx = 3;
13871387
pio_cfg.sm_rx = 2;
13881388
pio_cfg.sm_eop = 3;
13891389
pio_cfg.pio_rx_num = 0;
13901390
pio_cfg.pio_tx_num = 1;
13911391
pio_cfg.tx_ch = 9;
1392-
#elif defined(ARDUINO_RASPBERRY_PI_PICO_2W)
1393-
/* TBD */
13941392
#endif /* ARDUINO_RASPBERRY_PI_PICO_W */
13951393

13961394
USBHost.configure_pio_usb(1, &pio_cfg);

software/firmware/source/SoftRF/src/ui/Web.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ void handleRoot() {
837837
"<tr><th align=left>Uptime</th><td align=right>%02d:%02d:%02d</td></tr>\
838838
<tr><th align=left>Free memory</th><td align=right>%u</td></tr>\
839839
<tr><th align=left>Battery voltage</th><td align=right><font color=%s>%s</font></td></tr>"
840-
#if defined(USE_USB_HOST)
840+
#if defined(USE_USB_HOST) && defined(ESP32)
841841
"<tr><th align=left>USB client</th><td align=right>%s %s</td></tr>"
842842
#endif /* USE_USB_HOST */
843843
"</table>\
@@ -862,7 +862,7 @@ void handleRoot() {
862862
<td align=left><input type=button onClick=\"location.href='/settings'\" value='Settings'></td>\
863863
<td align=center><input type=button onClick=\"location.href='/about'\" value='About'></td>"),
864864
ThisAircraft.addr, SOFTRF_FIRMWARE_VERSION
865-
#if defined(USE_USB_HOST)
865+
#if defined(USE_USB_HOST) && defined(ESP32)
866866
"H"
867867
#endif /* USE_USB_HOST */
868868
#if defined(SOFTRF_ADDRESS)
@@ -878,7 +878,7 @@ void handleRoot() {
878878
#endif /* ENABLE_AHRS */
879879
UpTime.hours, UpTime.minutes, UpTime.seconds, SoC->getFreeHeap(),
880880
low_voltage ? "red" : "green", str_Vcc,
881-
#if defined(USE_USB_HOST)
881+
#if defined(USE_USB_HOST) && defined(ESP32)
882882
ESP32_USB_Serial.connected ? supported_USB_devices[ESP32_USB_Serial.index].first_name : "",
883883
ESP32_USB_Serial.connected ? supported_USB_devices[ESP32_USB_Serial.index].last_name : "N/A",
884884
#endif /* USE_USB_HOST */

0 commit comments

Comments
 (0)