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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Unmacro `Adc`
- Use `write` instead of `modify` to clear flags
- Bump `stm32f4-staging` to 0.18, update other dependencies
- `serial` mod refactor

## [v0.22.1] - 2024-11-03

Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ micromath = { version = "2.1.0", optional = true }

[dependencies.stm32f4]
package = "stm32f4-staging"
version = "0.18.0"
version = "0.19.0"
features = ["atomics"]

[dependencies.time]
Expand Down Expand Up @@ -168,7 +168,7 @@ gpio-f401 = [
"tim9",
"tim10",
"tim11",
"rcc_shared_m"
"rcc_shared_m",
]
gpio-f410 = [
"dac",
Expand Down Expand Up @@ -317,7 +317,7 @@ gpio-f417 = [
"usart3",
"uart4",
"uart5",
"rcc_shared_m"
"rcc_shared_m",
]
gpio-f427 = [
"gpiod",
Expand Down Expand Up @@ -364,7 +364,7 @@ gpio-f427 = [
"uart5",
"uart7",
"uart8",
"rcc_shared_m"
"rcc_shared_m",
]
gpio-f446 = [
"gpiod",
Expand Down Expand Up @@ -457,7 +457,7 @@ gpio-f469 = [
"uart5",
"uart7",
"uart8",
"rcc_shared_m"
"rcc_shared_m",
]

## Support monotonic timers and other stuff that can be used by [RTICv1 framework](https://crates.io/crates/cortex-m-rtic)
Expand Down
2 changes: 1 addition & 1 deletion examples/serial-dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use stm32f4xx_hal::{
self,
dma::{RxDMA, SerialDma, TxDMA},
},
uart::{config::StopBits, Config, Serial},
serial::{config::StopBits, Config, Serial},
};

/// Global variable for USART2 DMA handle.
Expand Down
3 changes: 1 addition & 2 deletions examples/uart-dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ use cortex_m_rt::entry;
use stm32f4xx_hal::dma::config::DmaConfig;
use stm32f4xx_hal::pac::Interrupt;
use stm32f4xx_hal::pac::{interrupt, DMA1};
use stm32f4xx_hal::uart::config::StopBits;
use stm32f4xx_hal::uart::{Config, Rx, Serial};
use stm32f4xx_hal::serial::{config::StopBits, Config, Rx, Serial};
use stm32f4xx_hal::{
dma::{StreamsTuple, Transfer},
pac,
Expand Down
2 changes: 1 addition & 1 deletion src/fmpi2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl<I2C: Instance> I2c<I2C> {
if isr.nackf().bit_is_set() {
self.i2c
.icr()
.write(|w| w.stopcf().set_bit().nackcf().set_bit());
.write(|w| w.stopcf().clear_bit_by_one().nackcf().clear_bit_by_one());
return Err(Error::NoAcknowledge(NoAcknowledgeSource::Unknown));
}

Expand Down
4 changes: 2 additions & 2 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub enum Pull {
Down = 2,
}

impl From<Pull> for pac::gpioa::pupdr::PUPDR0 {
impl From<Pull> for pac::gpioa::pupdr::PULL {
fn from(value: Pull) -> Self {
match value {
Pull::Down => Self::PullDown,
Expand Down Expand Up @@ -206,7 +206,7 @@ pub enum Speed {
VeryHigh = 3,
}

impl From<Speed> for pac::gpioa::ospeedr::OSPEEDR0 {
impl From<Speed> for pac::gpioa::ospeedr::OUTPUT_SPEED {
fn from(value: Speed) -> Self {
match value {
Speed::Low => Self::LowSpeed,
Expand Down
2 changes: 1 addition & 1 deletion src/gpio/convert.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::*;
use crate::pac::gpioa::{moder::MODER0 as Mode, otyper::OT0 as OutputType};
use crate::pac::gpioa::{moder::MODE as Mode, otyper::OUTPUT_TYPE as OutputType};

impl Input {
pub fn new<const P: char, const N: u8, MODE: PinMode>(
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ pub mod spi;
pub mod syscfg;
pub mod time;
pub mod timer;
#[cfg(feature = "uart4")]
pub mod uart;
pub mod watchdog;

mod sealed {
Expand Down
Loading