diff options
| -rw-r--r-- | embassy-rp/src/clocks.rs | 2 | ||||
| -rw-r--r-- | embassy-rp/src/pio/mod.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index b02f3796f..b7f6aeac9 100644 --- a/embassy-rp/src/clocks.rs +++ b/embassy-rp/src/clocks.rs | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | //! Clock configuration for the RP2040 | 1 | //! Clock configuration for the RP2040 |
| 2 | use core::arch::asm; | ||
| 2 | use core::marker::PhantomData; | 3 | use core::marker::PhantomData; |
| 3 | use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; | 4 | use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; |
| 4 | 5 | ||
| @@ -7,6 +8,7 @@ use pac::clocks::vals::*; | |||
| 7 | 8 | ||
| 8 | use crate::gpio::sealed::Pin; | 9 | use crate::gpio::sealed::Pin; |
| 9 | use crate::gpio::AnyPin; | 10 | use crate::gpio::AnyPin; |
| 11 | use crate::pac::common::{Reg, RW}; | ||
| 10 | use crate::{pac, reset, Peripheral}; | 12 | use crate::{pac, reset, Peripheral}; |
| 11 | 13 | ||
| 12 | // NOTE: all gpin handling is commented out for future reference. | 14 | // NOTE: all gpin handling is commented out for future reference. |
diff --git a/embassy-rp/src/pio/mod.rs b/embassy-rp/src/pio/mod.rs index 804a7636d..7eca700ba 100644 --- a/embassy-rp/src/pio/mod.rs +++ b/embassy-rp/src/pio/mod.rs | |||
| @@ -749,7 +749,7 @@ impl<'d, PIO: Instance + 'd, const SM: usize> StateMachine<'d, PIO, SM> { | |||
| 749 | w.set_set_count(1); | 749 | w.set_set_count(1); |
| 750 | }); | 750 | }); |
| 751 | // SET PINDIRS, (dir) | 751 | // SET PINDIRS, (dir) |
| 752 | unsafe { sm.exec_instr(0b1110_0000_1000_0000 | dir as u16) }; | 752 | unsafe { sm.exec_instr(0b111_00000_100_00000 | dir as u16) }; |
| 753 | } | 753 | } |
| 754 | }); | 754 | }); |
| 755 | } | 755 | } |
| @@ -764,7 +764,7 @@ impl<'d, PIO: Instance + 'd, const SM: usize> StateMachine<'d, PIO, SM> { | |||
| 764 | w.set_set_count(1); | 764 | w.set_set_count(1); |
| 765 | }); | 765 | }); |
| 766 | // SET PINS, (dir) | 766 | // SET PINS, (dir) |
| 767 | unsafe { sm.exec_instr(0b1110_0000_0000_0000 | level as u16) }; | 767 | unsafe { sm.exec_instr(0b11100_000_000_00000 | level as u16) }; |
| 768 | } | 768 | } |
| 769 | }); | 769 | }); |
| 770 | } | 770 | } |
