Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impl Peripheral for I2s trait #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions src/i2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use esp_idf_sys::{

#[cfg(not(esp_idf_version_major = "4"))]
use crate::interrupt::asynch::HalIsrNotification;
use crate::{delay, io::EspIOError};
use crate::{delay, io::EspIOError, peripheral::Peripheral};

// For v5+, we rely configuration options for PDM/TDM support.
// For v4, we have to examine the chip type.
Expand Down Expand Up @@ -481,7 +481,7 @@ pub mod config {
}

/// Trait implemented by I2S peripherals to obtain their port number.
pub trait I2s: Send + sealed::Sealed {
pub trait I2s: Peripheral<P = Self> + Send + sealed::Sealed {
/// Return the port number for the peripheral.
fn port() -> i2s_port_t;
}
Expand Down
Loading