mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
rp: fix watchdog CTRL register getting overwritten
This commit is contained in:
parent
000b022ae2
commit
9031ce7fa7
@ -46,7 +46,7 @@ impl Watchdog {
|
|||||||
/// or when JTAG is accessing bus fabric
|
/// or when JTAG is accessing bus fabric
|
||||||
pub fn pause_on_debug(&mut self, pause: bool) {
|
pub fn pause_on_debug(&mut self, pause: bool) {
|
||||||
let watchdog = pac::WATCHDOG;
|
let watchdog = pac::WATCHDOG;
|
||||||
watchdog.ctrl().write(|w| {
|
watchdog.ctrl().modify(|w| {
|
||||||
w.set_pause_dbg0(pause);
|
w.set_pause_dbg0(pause);
|
||||||
w.set_pause_dbg1(pause);
|
w.set_pause_dbg1(pause);
|
||||||
w.set_pause_jtag(pause);
|
w.set_pause_jtag(pause);
|
||||||
@ -60,7 +60,7 @@ impl Watchdog {
|
|||||||
|
|
||||||
fn enable(&self, bit: bool) {
|
fn enable(&self, bit: bool) {
|
||||||
let watchdog = pac::WATCHDOG;
|
let watchdog = pac::WATCHDOG;
|
||||||
watchdog.ctrl().write(|w| w.set_enable(bit))
|
watchdog.ctrl().modify(|w| w.set_enable(bit))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure which hardware will be reset by the watchdog
|
// Configure which hardware will be reset by the watchdog
|
||||||
|
Loading…
Reference in New Issue
Block a user