Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion esp-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ procmacros = { version = "0.22.0", package = "esp-hal-procmacros",
# They are needed when using the `unstable` feature.
digest = { version = "0.10.7", default-features = false, features = ["core-api"], optional = true }
embassy-usb-driver = { version = "0.2", optional = true }
embassy-usb-synopsys-otg = { version = "0.3.3", optional = true, features = ["host"] }
embassy-usb-synopsys-otg = { version = "0.4.0", optional = true, features = ["host"] }
embassy-net-driver-02 = { package = "embassy-net-driver", version = "0.2", optional = true }
embedded-can = { version = "0.4.1", optional = true }
nb = { version = "1.1", optional = true }
Expand Down
1 change: 1 addition & 0 deletions esp-hal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ For help getting started with this HAL, please refer to [The Rust on ESP Book] a
| ULP (FSM) | ❌ | | | | | | | | ❌ | ❌ |
| ULP (RISC-V) | | | | [❌][5160] [^1] | ⚒️ | | | ❌ | ⚒️ | ⚒️ |
| USB OTG FS | | | | | | | | ⚒️ | ⚒️ | ⚒️ |
| USB OTG HS | | | | | | | | ⚒️ | | |
| USB Serial/JTAG | | | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | | ⚒️ |
| WIFI | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | | | ⚒️ | ⚒️ |

Expand Down
10 changes: 6 additions & 4 deletions esp-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,6 @@ unstable_module! {
pub mod dma;
#[cfg(etm_driver_supported)]
pub mod etm;
#[cfg(usb_otg_driver_supported)]
pub mod otg_fs;
#[cfg(soc_has_psram)] // DMA needs some things from here
pub mod psram;
}
Expand Down Expand Up @@ -397,8 +395,12 @@ unstable_driver! {
pub mod tsens;
#[cfg(twai_driver_supported)]
pub mod twai;
#[cfg(usb_serial_jtag_driver_supported)]
pub mod usb_serial_jtag;
#[cfg(any(
usb_otg_driver_supported,
usb_otg_hs_driver_supported,
usb_serial_jtag_driver_supported,
))]
pub mod usb;
#[cfg(ethernet_driver_supported)]
pub mod ethernet;
}
Expand Down
3 changes: 3 additions & 0 deletions esp-hal/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ macro_rules! any_peripheral {
///
/// You must ensure that you're only using one instance of this type at a time.
#[inline]
#[allow(unused)]
pub unsafe fn clone_unchecked(&self) -> Self { unsafe {
any::delegate!(self, inner => { Self::from(inner.clone_unchecked()) })
}}
Expand All @@ -170,6 +171,7 @@ macro_rules! any_peripheral {
///
/// [Peripheral singleton]: crate#peripheral-singletons
#[inline]
#[allow(unused)]
pub fn reborrow(&mut self) -> $name<'_> {
unsafe { self.clone_unchecked() }
}
Expand Down Expand Up @@ -211,6 +213,7 @@ let uart0 = any_peri1
"#
)]
#[inline]
#[allow(unused)]
pub fn downcast<P>(self) -> Result<P, Self>
where
Self: TryInto<P, Error = Self>
Expand Down
70 changes: 0 additions & 70 deletions esp-hal/src/otg_fs/embassy_usb_host.rs

This file was deleted.

183 changes: 0 additions & 183 deletions esp-hal/src/otg_fs/mod.rs

This file was deleted.

7 changes: 7 additions & 0 deletions esp-hal/src/usb/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//! USB support

#[cfg(usb_serial_jtag_driver_supported)]
pub mod usb_serial_jtag;

#[cfg(any(usb_otg_driver_supported, usb_otg_hs_driver_supported))]
pub mod otg;
Loading
Loading