diff options
| -rw-r--r-- | embassy-rp/src/clocks.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index ed146844c..f229a5acd 100644 --- a/embassy-rp/src/clocks.rs +++ b/embassy-rp/src/clocks.rs | |||
| @@ -847,6 +847,10 @@ impl<'d, T: GpinPin> Gpin<'d, T> { | |||
| 847 | into_ref!(gpin); | 847 | into_ref!(gpin); |
| 848 | 848 | ||
| 849 | gpin.gpio().ctrl().write(|w| w.set_funcsel(0x08)); | 849 | gpin.gpio().ctrl().write(|w| w.set_funcsel(0x08)); |
| 850 | #[cfg(feature = "_rp235x")] | ||
| 851 | gpin.pad_ctrl().write(|w| { | ||
| 852 | w.set_iso(false); | ||
| 853 | }); | ||
| 850 | 854 | ||
| 851 | Gpin { | 855 | Gpin { |
| 852 | gpin: gpin.map_into(), | 856 | gpin: gpin.map_into(), |
| @@ -861,6 +865,7 @@ impl<'d, T: GpinPin> Gpin<'d, T> { | |||
| 861 | 865 | ||
| 862 | impl<'d, T: GpinPin> Drop for Gpin<'d, T> { | 866 | impl<'d, T: GpinPin> Drop for Gpin<'d, T> { |
| 863 | fn drop(&mut self) { | 867 | fn drop(&mut self) { |
| 868 | self.gpin.pad_ctrl().write(|_| {}); | ||
| 864 | self.gpin | 869 | self.gpin |
| 865 | .gpio() | 870 | .gpio() |
| 866 | .ctrl() | 871 | .ctrl() |
| @@ -921,11 +926,15 @@ pub struct Gpout<'d, T: GpoutPin> { | |||
| 921 | } | 926 | } |
| 922 | 927 | ||
| 923 | impl<'d, T: GpoutPin> Gpout<'d, T> { | 928 | impl<'d, T: GpoutPin> Gpout<'d, T> { |
| 924 | /// Create new general purpose cloud output. | 929 | /// Create new general purpose clock output. |
| 925 | pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self { | 930 | pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self { |
| 926 | into_ref!(gpout); | 931 | into_ref!(gpout); |
| 927 | 932 | ||
| 928 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08)); | 933 | gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08)); |
| 934 | #[cfg(feature = "_rp235x")] | ||
| 935 | gpout.pad_ctrl().write(|w| { | ||
| 936 | w.set_iso(false); | ||
| 937 | }); | ||
| 929 | 938 | ||
| 930 | Self { gpout } | 939 | Self { gpout } |
| 931 | } | 940 | } |
| @@ -1005,6 +1014,7 @@ impl<'d, T: GpoutPin> Gpout<'d, T> { | |||
| 1005 | impl<'d, T: GpoutPin> Drop for Gpout<'d, T> { | 1014 | impl<'d, T: GpoutPin> Drop for Gpout<'d, T> { |
| 1006 | fn drop(&mut self) { | 1015 | fn drop(&mut self) { |
| 1007 | self.disable(); | 1016 | self.disable(); |
| 1017 | self.gpout.pad_ctrl().write(|_| {}); | ||
| 1008 | self.gpout | 1018 | self.gpout |
| 1009 | .gpio() | 1019 | .gpio() |
| 1010 | .ctrl() | 1020 | .ctrl() |
