mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-11 13:01:30 +11:00
Pull pads out of reset and wait
We're technically supposed to wait for these resets to finish before poking at registers. This seems to fix the instability I was seeing on the input example especially (TBH I have no idea how it ever worked)
This commit is contained in:
parent
7e45c96a65
commit
8290368c10
|
@ -95,7 +95,13 @@ macro_rules! gpio {
|
|||
type Parts = Parts;
|
||||
|
||||
fn split(self, pads: pac::$PADSX, sio: pac::SIO, resets: &mut pac::RESETS) -> Parts {
|
||||
resets.reset.modify(|_, w| w.$gpiox().clear_bit());
|
||||
resets.reset.modify(|_, w| w.$gpiox().clear_bit().$padsx().clear_bit());
|
||||
while resets.reset_done.read().$gpiox().bit_is_clear() {
|
||||
cortex_m::asm::delay(10);
|
||||
}
|
||||
while resets.reset_done.read().$padsx().bit_is_clear() {
|
||||
cortex_m::asm::delay(10);
|
||||
}
|
||||
Parts {
|
||||
_pads: pads,
|
||||
_sio: sio,
|
||||
|
|
Loading…
Reference in a new issue