nrf/buffered_uarte: Fix crash when calling set_baudrate as the very first thing.
This commit is contained in:
parent
51d5f19983
commit
d1eeef5864
@ -177,7 +177,9 @@ impl<'d, U: UarteInstance, T: TimerInstance> BufferedUarte<'d, U, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_baudrate(self: Pin<&mut Self>, baudrate: Baudrate) {
|
pub fn set_baudrate(self: Pin<&mut Self>, baudrate: Baudrate) {
|
||||||
self.inner().with(|state, _irq| {
|
let mut inner = self.inner();
|
||||||
|
inner.as_mut().register_interrupt();
|
||||||
|
inner.with(|state, _irq| {
|
||||||
let r = U::regs();
|
let r = U::regs();
|
||||||
let rt = state.timer.regs();
|
let rt = state.timer.regs();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user