Skip to content

Commit 57bd07e

Browse files
vadzimdambrouskimvertescher
authored andcommitted
Update stm32f7 to version 0.9.0
1 parent e37de5a commit 57bd07e

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ as-slice = "0.1.0"
1919
cortex-m = "0.6.0"
2020
cortex-m-rt = "0.6.8"
2121
nb = "0.1.2"
22-
stm32f7 = "0.8.0"
22+
stm32f7 = "0.9.0"
2323

2424
[dependencies.bare-metal]
2525
version = "0.2.4"
@@ -48,10 +48,10 @@ stm32f722 = ["stm32f7/stm32f7x2"]
4848
stm32f723 = ["stm32f7/stm32f7x3"]
4949
stm32f732 = ["stm32f7/stm32f7x2"]
5050
stm32f733 = ["stm32f7/stm32f7x3"]
51-
stm32f745 = ["stm32f7/stm32f7x5"]
51+
stm32f745 = ["stm32f7/stm32f745"]
5252
stm32f746 = ["stm32f7/stm32f7x6"]
5353
stm32f756 = ["stm32f7/stm32f7x6"]
54-
stm32f765 = ["stm32f7/stm32f7x5"]
54+
stm32f765 = ["stm32f7/stm32f765"]
5555
stm32f767 = ["stm32f7/stm32f7x7"]
5656
stm32f769 = ["stm32f7/stm32f7x9"]
5757
stm32f777 = ["stm32f7/stm32f7x7"]

src/dma.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -716,29 +716,29 @@ where
716716
}
717717

718718
pub trait SupportedWordSize: private::Sealed + Unpin + 'static {
719-
fn msize() -> cr::MSIZEW;
720-
fn psize() -> cr::PSIZEW;
719+
fn msize() -> cr::MSIZE_A;
720+
fn psize() -> cr::PSIZE_A;
721721
}
722722

723723
impl private::Sealed for u8 {}
724724
impl SupportedWordSize for u8 {
725-
fn msize() -> cr::MSIZEW {
726-
cr::MSIZEW::BITS8
725+
fn msize() -> cr::MSIZE_A {
726+
cr::MSIZE_A::BITS8
727727
}
728728

729-
fn psize() -> cr::PSIZEW {
730-
cr::MSIZEW::BITS8
729+
fn psize() -> cr::PSIZE_A {
730+
cr::MSIZE_A::BITS8
731731
}
732732
}
733733

734734
impl private::Sealed for u16 {}
735735
impl SupportedWordSize for u16 {
736-
fn msize() -> cr::MSIZEW {
737-
cr::MSIZEW::BITS16
736+
fn msize() -> cr::MSIZE_A {
737+
cr::MSIZE_A::BITS16
738738
}
739739

740-
fn psize() -> cr::PSIZEW {
741-
cr::MSIZEW::BITS16
740+
fn psize() -> cr::PSIZE_A {
741+
cr::MSIZE_A::BITS16
742742
}
743743
}
744744

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub use stm32f7::stm32f7x2 as device;
5151
pub use stm32f7::stm32f7x3 as device;
5252

5353
#[cfg(feature = "stm32f745")]
54-
pub use stm32f7::stm32f7x5 as device;
54+
pub use stm32f7::stm32f745 as device;
5555

5656
#[cfg(feature = "stm32f746")]
5757
pub use stm32f7::stm32f7x6 as device;
@@ -60,7 +60,7 @@ pub use stm32f7::stm32f7x6 as device;
6060
pub use stm32f7::stm32f7x6 as device;
6161

6262
#[cfg(feature = "stm32f765")]
63-
pub use stm32f7::stm32f7x5 as device;
63+
pub use stm32f7::stm32f765 as device;
6464

6565
#[cfg(feature = "stm32f767")]
6666
pub use stm32f7::stm32f7x7 as device;

src/spi.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! See chapter 32 in the STM32F746 Reference Manual.
44
5-
pub use crate::device::spi1::cr1::BRW as ClockDivider;
5+
pub use crate::device::spi1::cr1::BR_A as ClockDivider;
66
pub use embedded_hal::spi::{Mode, Phase, Polarity};
77

88
use core::{fmt, marker::PhantomData, ops::DerefMut, pin::Pin, ptr};
@@ -68,7 +68,7 @@ where
6868

6969
self.spi.enable_clock(rcc);
7070
self.spi
71-
.configure::<Word>(clock_divider._bits(), cpol, cpha);
71+
.configure::<Word>(clock_divider.into(), cpol, cpha);
7272

7373
Spi {
7474
spi: self.spi,
@@ -316,11 +316,11 @@ macro_rules! impl_instance {
316316
//
317317
// This is safe, as `Word::ds` returns an enum which can
318318
// only encode valid variants for this field.
319-
let w = unsafe { w.ds().bits(Word::ds()._bits()) };
319+
let w = unsafe { w.ds().bits(Word::ds().into()) };
320320

321321
w
322322
// FIFO reception threshold.
323-
.frxth().bit(Word::frxth()._bits())
323+
.frxth().bit(Word::frxth().into())
324324
// Disable TX buffer empty interrupt
325325
.txeie().masked()
326326
// Disable RX buffer not empty interrupt
@@ -736,29 +736,29 @@ where
736736
pub struct Enabled<Word>(PhantomData<Word>);
737737

738738
pub trait SupportedWordSize: dma::SupportedWordSize + private::Sealed {
739-
fn frxth() -> cr2::FRXTHW;
740-
fn ds() -> cr2::DSW;
739+
fn frxth() -> cr2::FRXTH_A;
740+
fn ds() -> cr2::DS_A;
741741
}
742742

743743
impl private::Sealed for u8 {}
744744
impl SupportedWordSize for u8 {
745-
fn frxth() -> cr2::FRXTHW {
746-
cr2::FRXTHW::QUARTER
745+
fn frxth() -> cr2::FRXTH_A {
746+
cr2::FRXTH_A::QUARTER
747747
}
748748

749-
fn ds() -> cr2::DSW {
750-
cr2::DSW::EIGHTBIT
749+
fn ds() -> cr2::DS_A {
750+
cr2::DS_A::EIGHTBIT
751751
}
752752
}
753753

754754
impl private::Sealed for u16 {}
755755
impl SupportedWordSize for u16 {
756-
fn frxth() -> cr2::FRXTHW {
757-
cr2::FRXTHW::HALF
756+
fn frxth() -> cr2::FRXTH_A {
757+
cr2::FRXTH_A::HALF
758758
}
759759

760-
fn ds() -> cr2::DSW {
761-
cr2::DSW::SIXTEENBIT
760+
fn ds() -> cr2::DS_A {
761+
cr2::DS_A::SIXTEENBIT
762762
}
763763
}
764764

0 commit comments

Comments
 (0)