Skip to content

Commit

Permalink
update featherwing host to new revision
Browse files Browse the repository at this point in the history
- cs, int are pin 10, 9
- remove GPIO0 as vbus enable
  • Loading branch information
hathach committed Dec 15, 2023
1 parent ebbd30b commit 0ff42ce
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 58 deletions.
7 changes: 2 additions & 5 deletions examples/DualRole/CDC/serial_host_bridge/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down
7 changes: 2 additions & 5 deletions examples/DualRole/HID/hid_device_report/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ void setup() {
// init host stack on controller (rhport) 1
// For rp2040: this is called in core1's setup1()
USBHost.begin(1);

// FeatherWing USB Host use MAX3421E's GPIO0 as VBUS enable (active high)
USBHost.max3421_writeIOPINS1(0x01, false);
#endif

//while ( !Serial ) delay(10); // wait for native usb
Expand Down
7 changes: 2 additions & 5 deletions examples/DualRole/HID/hid_mouse_log_filter/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ void setup() {
// init host stack on controller (rhport) 1
// For rp2040: this is called in core1's setup1()
USBHost.begin(1);

// FeatherWing USB Host use MAX3421E's GPIO0 as VBUS enable (active high)
USBHost.max3421_writeIOPINS1(0x01, false);
#endif

//while ( !Serial ) delay(10); // wait for native usb
Expand Down
7 changes: 2 additions & 5 deletions examples/DualRole/HID/hid_mouse_tremor_filter/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down
3 changes: 0 additions & 3 deletions examples/DualRole/HID/hid_remapper/hid_remapper.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ void setup() {
// init host stack on controller (rhport) 1
// For rp2040: this is called in core1's setup1()
USBHost.begin(1);

// FeatherWing USB Host use MAX3421E's GPIO0 as VBUS enable (active high)
USBHost.max3421_writeIOPINS1(0x01, false);
#endif

//while ( !Serial ) delay(10); // wait for native usb
Expand Down
7 changes: 2 additions & 5 deletions examples/DualRole/HID/hid_remapper/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ void setup() {
// init host stack on controller (rhport) 1
// For rp2040: this is called in core1's setup1()
USBHost.begin(1);

// FeatherWing USB Host use MAX3421E's GPIO0 as VBUS enable (active high)
USBHost.max3421_writeIOPINS1(0x01, false);
#endif

#ifdef USE_FREERTOS
Expand Down
7 changes: 2 additions & 5 deletions examples/DualRole/MassStorage/msc_data_logger/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ void setup() {
// init host stack on controller (rhport) 1
// For rp2040: this is called in core1's setup1()
USBHost.begin(1);

// FeatherWing USB Host use MAX3421E's GPIO0 as VBUS enable (active high)
USBHost.max3421_writeIOPINS1(0x01, false);
#endif

// while ( !Serial ) delay(10); // wait for native usb
Expand Down
7 changes: 2 additions & 5 deletions examples/DualRole/MassStorage/msc_file_explorer/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down
3 changes: 0 additions & 3 deletions examples/DualRole/Simple/device_info/device_info.ino
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ void setup() {
// init host stack on controller (rhport) 1
// For rp2040: this is called in core1's setup1()
USBHost.begin(1);

// FeatherWing USB Host use MAX3421E's GPIO0 as VBUS enable (active high)
USBHost.max3421_writeIOPINS1(0x01, false);
#endif

// while ( !Serial ) delay(10); // wait for native usb
Expand Down
7 changes: 2 additions & 5 deletions examples/DualRole/Simple/device_info/usbh_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
Adafruit_USBH_Host USBHost(&SPI, 15, 14);
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
Adafruit_USBH_Host USBHost(&SPI, 27, 33);
#elif defined(ARDUINO_METRO_ESP32S3) || defined(ADAFRUIT_METRO_M4_EXPRESS) || defined(ADAFRUIT_METRO_M0_EXPRESS)
// For Metro shape CS and INT are pin 10, 9 (host shield default)
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#else
// default to FeatherWing USB Host MAX3421E: CS and INT are pin D11, D10
Adafruit_USBH_Host USBHost(&SPI, 11, 10);
// Default CS and INT are pin 10, 9
Adafruit_USBH_Host USBHost(&SPI, 10, 9);
#endif
#else
// Native USB Host such as rp2040
Expand Down

0 comments on commit 0ff42ce

Please sign in to comment.