diff options
| author | JuliDi <[email protected]> | 2025-03-19 10:16:38 +0100 |
|---|---|---|
| committer | JuliDi <[email protected]> | 2025-03-19 10:32:16 +0100 |
| commit | f15c587887b39c8027c8c557794b027e09e27d30 (patch) | |
| tree | 36d16444850ef3cfe60192ad02146e60653f31d4 | |
| parent | 9d672c44d1dccaac039c656bc2986c4fcf9823c9 (diff) | |
fix wrong funcsel on rp2350 gpout/gpin
| -rw-r--r-- | embassy-rp/src/clocks.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index 2ac2c925e..9423a7e13 100644 --- a/embassy-rp/src/clocks.rs +++ b/embassy-rp/src/clocks.rs | |||
| @@ -854,7 +854,14 @@ 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 | |||
| 864 | |||
| 858 | #[cfg(feature = "_rp235x")] | 865 | #[cfg(feature = "_rp235x")] |
| 859 | gpin.pad_ctrl().write(|w| { | 866 | gpin.pad_ctrl().write(|w| { |
| 860 | w.set_iso(false); | 867 | w.set_iso(false); |
| @@ -938,7 +945,14 @@ impl<'d, T: GpoutPin> Gpout<'d, T> { | |||
| 938 | pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self { | 945 | pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self { |
| 939 | into_ref!(gpout); | 946 | into_ref!(gpout); |
| 940 | 947 | ||
| 948 | #[cfg(feature = "rp2040")] | ||
| 941 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08)); | 949 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08)); |
| 950 | |||
| 951 | // On RP2350 GPOUT changed from F8 toF9 | ||
| 952 | #[cfg(feature = "_rp235x")] | ||
| 953 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x09)); | ||
| 954 | |||
| 955 | |||
| 942 | #[cfg(feature = "_rp235x")] | 956 | #[cfg(feature = "_rp235x")] |
| 943 | gpout.pad_ctrl().write(|w| { | 957 | gpout.pad_ctrl().write(|w| { |
| 944 | w.set_iso(false); | 958 | w.set_iso(false); |
