mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-26 16:52:33 +00:00
Exclude usart_v1
This commit is contained in:
parent
cd6256a924
commit
387a4fcb8e
@ -124,6 +124,7 @@ pub struct Config {
|
|||||||
/// Set this to true if the line is considered noise free.
|
/// Set this to true if the line is considered noise free.
|
||||||
/// This will increase the receivers tolerance to clock deviations,
|
/// This will increase the receivers tolerance to clock deviations,
|
||||||
/// but will effectively disable noise detection.
|
/// but will effectively disable noise detection.
|
||||||
|
#[cfg(not(usart_v1))]
|
||||||
pub assume_noise_free: bool,
|
pub assume_noise_free: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,6 +137,7 @@ impl Default for Config {
|
|||||||
parity: Parity::ParityNone,
|
parity: Parity::ParityNone,
|
||||||
// historical behavior
|
// historical behavior
|
||||||
detect_previous_overrun: false,
|
detect_previous_overrun: false,
|
||||||
|
#[cfg(not(usart_v1))]
|
||||||
assume_noise_free: false,
|
assume_noise_free: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -917,6 +919,7 @@ fn configure(r: Regs, config: &Config, pclk_freq: Hertz, kind: Kind, enable_rx:
|
|||||||
});
|
});
|
||||||
|
|
||||||
r.cr3().modify(|w| {
|
r.cr3().modify(|w| {
|
||||||
|
#[cfg(not(usart_v1))]
|
||||||
w.set_onebit(config.assume_noise_free);
|
w.set_onebit(config.assume_noise_free);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user