Skip to content

Commit

Permalink
Publish traits
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 6, 2024
1 parent 4da37f5 commit 1ab4574
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions esp-hal/src/spi/slave.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,19 +571,19 @@ pub mod dma {
}
}

#[doc(hidden)]
/// SPI peripheral instance.
pub trait Instance: Peripheral<P = Self> + Into<AnySpi> + PeripheralMarker + 'static {
/// Returns the peripheral data describing this SPI instance.
fn info(&self) -> &'static Info;
}

/// A marker for DMA-capable SPI peripheral instances.
pub trait InstanceDma: Instance + DmaEligible {}

impl InstanceDma for crate::peripherals::SPI2 {}
#[cfg(spi3)]
impl InstanceDma for crate::peripherals::SPI3 {}

#[doc(hidden)]
pub trait Instance: Peripheral<P = Self> + Into<AnySpi> + PeripheralMarker + 'static {
/// Returns the peripheral data describing this SPI instance.
fn info(&self) -> &'static Info;
}

/// Peripheral data describing a particular SPI instance.
#[non_exhaustive]
pub struct Info {
Expand Down

0 comments on commit 1ab4574

Please sign in to comment.