summaryrefslogtreecommitdiff
path: root/examples/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-08-27 23:45:34 +0700
committerhathach <[email protected]>2023-08-27 23:45:34 +0700
commit502b1bdda62f0f207d9a51daf134574e455f3aa2 (patch)
treef93c491346f05d14c841035e511186bae531a13b /examples/host
parentcd7464a8847db5efa14f568bdf8746d898fc7eb4 (diff)
more update to transaction
Diffstat (limited to 'examples/host')
-rw-r--r--examples/host/cdc_msc_hid/src/tusb_config.h9
-rw-r--r--examples/host/msc_file_explorer/src/tusb_config.h10
2 files changed, 13 insertions, 6 deletions
diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h
index abb75f068..7d621d466 100644
--- a/examples/host/cdc_msc_hid/src/tusb_config.h
+++ b/examples/host/cdc_msc_hid/src/tusb_config.h
@@ -35,9 +35,12 @@
//--------------------------------------------------------------------+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
-// change to 1 if using pico-pio-usb as host controller for raspberry rp2040
-#define CFG_TUH_RPI_PIO_USB 0
-#define BOARD_TUH_RHPORT CFG_TUH_RPI_PIO_USB
+ // change to 1 if using pico-pio-usb as host controller for raspberry rp2040
+ #define CFG_TUH_RPI_PIO_USB 0
+ #define BOARD_TUH_RHPORT CFG_TUH_RPI_PIO_USB
+#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
+ // Use external USB controller (via SPI) MAX3421E (aka usb host shield)
+ #define CFG_TUH_MAX3421 1
#endif
// RHPort number used for host can be defined by board.mk, default to port 0
diff --git a/examples/host/msc_file_explorer/src/tusb_config.h b/examples/host/msc_file_explorer/src/tusb_config.h
index 1e0d067bf..bb2fd4cf5 100644
--- a/examples/host/msc_file_explorer/src/tusb_config.h
+++ b/examples/host/msc_file_explorer/src/tusb_config.h
@@ -35,11 +35,15 @@
//--------------------------------------------------------------------+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
-// change to 1 if using pico-pio-usb as host controller for raspberry rp2040
-#define CFG_TUH_RPI_PIO_USB 0
-#define BOARD_TUH_RHPORT CFG_TUH_RPI_PIO_USB
+ // change to 1 if using pico-pio-usb as host controller for raspberry rp2040
+ #define CFG_TUH_RPI_PIO_USB 0
+ #define BOARD_TUH_RHPORT CFG_TUH_RPI_PIO_US
+#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
+ // Use external USB controller (via SPI) MAX3421E (aka usb host shield)
+ #define CFG_TUH_MAX3421 1
#endif
+
// RHPort number used for host can be defined by board.mk, default to port 0
#ifndef BOARD_TUH_RHPORT
#define BOARD_TUH_RHPORT 0