Skip to content

Commit ca56b16

Browse files
committed
add i2s, read, remove SetAlternate
1 parent fbe30bb commit ca56b16

File tree

8 files changed

+251
-329
lines changed

8 files changed

+251
-329
lines changed

examples/rtic-i2s-audio-in-out.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ mod app {
8080

8181
use super::hal;
8282

83-
use hal::gpio::gpioa::*;
84-
use hal::gpio::gpiob::*;
85-
use hal::gpio::gpioc::*;
8683
use hal::gpio::Edge;
8784
use hal::gpio::NoPin;
8885
use hal::i2s::stm32_i2s_v12x::driver::*;
@@ -95,8 +92,8 @@ mod app {
9592

9693
use rtt_target::{rprintln, rtt_init, set_print_channel};
9794

98-
type I2s2Driver = I2sDriver<I2s<SPI2, (PB12, PB13, PC6, PB15)>, Master, Receive, Philips>;
99-
type I2s3Driver = I2sDriver<I2s<SPI3, (PA4, PC10, NoPin, PC12)>, Slave, Transmit, Philips>;
95+
type I2s2Driver = I2sDriver<I2s<SPI2>, Master, Receive, Philips>;
96+
type I2s3Driver = I2sDriver<I2s<SPI3>, Slave, Transmit, Philips>;
10097

10198
// Part of the frame we currently transmit or receive
10299
#[derive(Copy, Clone)]

src/can.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ can! { CAN2: Can2, can2 }
2727
#[cfg(feature = "can3")]
2828
can! { crate::pac::CAN3: Can3, can3 }
2929

30-
pub struct Tx;
31-
impl crate::Sealed for Tx {}
32-
pub struct Rx;
33-
impl crate::Sealed for Rx {}
34-
3530
/// Pins and definitions for models with a third CAN peripheral
3631
#[cfg(feature = "can3")]
3732
mod can3 {

src/gpio.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
use core::marker::PhantomData;
5858

5959
pub mod alt;
60-
pub(crate) use alt::{Const, PinA, SetAlternate};
6160
mod convert;
6261
pub use convert::PinMode;
6362
mod partially_erased;
@@ -154,6 +153,8 @@ impl<MODE> marker::Interruptable for Output<MODE> {}
154153
impl marker::Interruptable for Input {}
155154
impl marker::Readable for Input {}
156155
impl marker::Readable for Output<OpenDrain> {}
156+
impl<const A: u8, Otype> marker::Interruptable for Alternate<A, Otype> {}
157+
impl<const A: u8, Otype> marker::Readable for Alternate<A, Otype> {}
157158
impl marker::Active for Input {}
158159
impl<Otype> marker::OutputSpeed for Output<Otype> {}
159160
impl<const A: u8, Otype> marker::OutputSpeed for Alternate<A, Otype> {}

0 commit comments

Comments
 (0)