diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index 2c8ebb4ae..dd21e9425 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix `sleep_light` for ESP32-C6 (#1720) - ROM Functions: Fix address of `ets_update_cpu_frequency_rom` (#1722) - Fix `regi2c_*` functions for `esp32h2` (#1737) +- EESP32-S2 / ESP32-S3: Fix UsbDm and UsbDp for Gpio19 and Gpio20 ### Changed diff --git a/esp-hal/src/soc/esp32s2/gpio.rs b/esp-hal/src/soc/esp32s2/gpio.rs index 278275840..c39fa33cb 100644 --- a/esp-hal/src/soc/esp32s2/gpio.rs +++ b/esp-hal/src/soc/esp32s2/gpio.rs @@ -555,5 +555,5 @@ impl InterruptStatusRegisterAccess for InterruptStatusRegisterAccessBank1 { } // implement marker traits on USB pins -impl crate::otg_fs::UsbDp for Gpio19 {} -impl crate::otg_fs::UsbDm for Gpio20 {} +impl crate::otg_fs::UsbDm for Gpio19 {} +impl crate::otg_fs::UsbDp for Gpio20 {} diff --git a/esp-hal/src/soc/esp32s3/gpio.rs b/esp-hal/src/soc/esp32s3/gpio.rs index 6a2529bf9..b38651f99 100644 --- a/esp-hal/src/soc/esp32s3/gpio.rs +++ b/esp-hal/src/soc/esp32s3/gpio.rs @@ -489,5 +489,5 @@ impl InterruptStatusRegisterAccess for InterruptStatusRegisterAccessBank1 { } // implement marker traits on USB pins -impl crate::otg_fs::UsbDp for Gpio19 {} -impl crate::otg_fs::UsbDm for Gpio20 {} +impl crate::otg_fs::UsbDm for Gpio19 {} +impl crate::otg_fs::UsbDp for Gpio20 {} diff --git a/examples/src/bin/embassy_usb_serial.rs b/examples/src/bin/embassy_usb_serial.rs index 26d10b185..e92d338ff 100644 --- a/examples/src/bin/embassy_usb_serial.rs +++ b/examples/src/bin/embassy_usb_serial.rs @@ -39,7 +39,7 @@ async fn main(_spawner: Spawner) -> () { esp_hal_embassy::init(&clocks, TimerGroup::new_async(peripherals.TIMG0, &clocks)); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); - let usb = Usb::new(peripherals.USB0, io.pins.gpio19, io.pins.gpio20); + let usb = Usb::new(peripherals.USB0, io.pins.gpio20, io.pins.gpio19); // Create the driver, from the HAL. let mut ep_out_buffer = [0u8; 1024]; diff --git a/examples/src/bin/usb_serial.rs b/examples/src/bin/usb_serial.rs index 0bfb2208d..3f470571f 100644 --- a/examples/src/bin/usb_serial.rs +++ b/examples/src/bin/usb_serial.rs @@ -27,7 +27,7 @@ fn main() -> ! { let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); - let usb = Usb::new(peripherals.USB0, io.pins.gpio19, io.pins.gpio20); + let usb = Usb::new(peripherals.USB0, io.pins.gpio20, io.pins.gpio19); let usb_bus = UsbBus::new(usb, unsafe { &mut *addr_of_mut!(EP_MEMORY) }); let mut serial = SerialPort::new(&usb_bus);