Skip to content

Commit

Permalink
Hardware flow control for serial interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rtvd committed Oct 2, 2023
1 parent b497dde commit 140cda4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ where
// Enable DMA
usart.cr3.write(|w| w.dmat().enabled().dmar().enabled());

// Configure hardware flow control
usart.cr3.write(|w| w.ctse.bit(config.cts_enabled).rtse.bit(config.rts_enabled));

Check failure on line 196 in src/serial.rs

View workflow job for this annotation

GitHub Actions / ci (stm32f723, stable)

attempted to take value of method `ctse` on type `&mut stm32f7::stm32f7x3::usart1::cr3::W`

Check failure on line 196 in src/serial.rs

View workflow job for this annotation

GitHub Actions / ci (stm32f733, stable)

attempted to take value of method `ctse` on type `&mut stm32f7::stm32f7x3::usart1::cr3::W`

Serial { usart, pins }
}

Expand Down Expand Up @@ -438,7 +441,8 @@ pub struct Config {
pub sysclock: bool,
pub parity: Parity,
pub data_bits: DataBits,

pub cts_enabled: bool,
pub rts_enabled: bool,
}

pub enum Oversampling {
Expand Down Expand Up @@ -479,6 +483,8 @@ impl Default for Config {
sysclock: false,
parity: Parity::ParityNone,
data_bits: DataBits::Bits8,
cts_enabled: false,
rts_enabled: false,
}
}
}
Expand Down

0 comments on commit 140cda4

Please sign in to comment.