diff options
| -rw-r--r-- | embassy-rp/src/clocks.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index 2ac2c925e..705dde62a 100644 --- a/embassy-rp/src/clocks.rs +++ b/embassy-rp/src/clocks.rs | |||
| @@ -854,7 +854,13 @@ impl<'d, T: GpinPin> Gpin<'d, T> { | |||
| 854 | pub fn new(gpin: impl Peripheral<P = T> + 'd) -> Self { | 854 | pub fn new(gpin: impl Peripheral<P = T> + 'd) -> Self { |
| 855 | into_ref!(gpin); | 855 | into_ref!(gpin); |
| 856 | 856 | ||
| 857 | #[cfg(feature = "rp2040")] | ||
| 857 | gpin.gpio().ctrl().write(|w| w.set_funcsel(0x08)); | 858 | gpin.gpio().ctrl().write(|w| w.set_funcsel(0x08)); |
| 859 | |||
| 860 | // On RP2350 GPIN changed from F8 toF9 | ||
| 861 | #[cfg(feature = "_rp235x")] | ||
| 862 | gpin.gpio().ctrl().write(|w| w.set_funcsel(0x09)); | ||
| 863 | |||
| 858 | #[cfg(feature = "_rp235x")] | 864 | #[cfg(feature = "_rp235x")] |
| 859 | gpin.pad_ctrl().write(|w| { | 865 | gpin.pad_ctrl().write(|w| { |
| 860 | w.set_iso(false); | 866 | w.set_iso(false); |
| @@ -938,7 +944,13 @@ impl<'d, T: GpoutPin> Gpout<'d, T> { | |||
| 938 | pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self { | 944 | pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self { |
| 939 | into_ref!(gpout); | 945 | into_ref!(gpout); |
| 940 | 946 | ||
| 947 | #[cfg(feature = "rp2040")] | ||
| 941 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08)); | 948 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08)); |
| 949 | |||
| 950 | // On RP2350 GPOUT changed from F8 toF9 | ||
| 951 | #[cfg(feature = "_rp235x")] | ||
| 952 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x09)); | ||
| 953 | |||
| 942 | #[cfg(feature = "_rp235x")] | 954 | #[cfg(feature = "_rp235x")] |
| 943 | gpout.pad_ctrl().write(|w| { | 955 | gpout.pad_ctrl().write(|w| { |
| 944 | w.set_iso(false); | 956 | w.set_iso(false); |
