stm32: Implement set_config
for Uart structs
This commit is contained in:
@ -323,7 +323,7 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> {
|
||||
}
|
||||
|
||||
/// Reconfigures it with the supplied config.
|
||||
pub fn reconfigure(&mut self, config: Config) {
|
||||
pub fn set_config(&mut self, config: Config) {
|
||||
let cpha = config.raw_phase();
|
||||
let cpol = config.raw_polarity();
|
||||
|
||||
@ -1062,6 +1062,6 @@ foreach_peripheral!(
|
||||
impl<'d, T: Instance, Tx, Rx> SetConfig for Spi<'d, T, Tx, Rx> {
|
||||
type Config = Config;
|
||||
fn set_config(&mut self, config: &Self::Config) {
|
||||
self.reconfigure(*config);
|
||||
self.set_config(*config);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user