aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-03-19 12:38:25 +0000
committerGitHub <[email protected]>2025-03-19 12:38:25 +0000
commitfec98fa366b94ff4740d04a89344b88685a381f1 (patch)
treeebc2e71da8754527c649624b28b1523017ee33eb
parent81e90935071e6d6a5ce4786a2e94c66fbadbe979 (diff)
parent436f940d5a8398e6aebd328db4da22aec775d1e6 (diff)
Merge pull request #3975 from JuliDi/fix-rp2350-gpout
[RP235x] Fix wrong funcsel on RP2350 GPOUT/GPIN
-rw-r--r--embassy-rp/src/clocks.rs12
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);