Merge pull request #3975 from JuliDi/fix-rp2350-gpout
[RP235x] Fix wrong funcsel on RP2350 GPOUT/GPIN
This commit is contained in:
commit
fec98fa366
@ -854,7 +854,13 @@ impl<'d, T: GpinPin> Gpin<'d, T> {
|
|||||||
pub fn new(gpin: impl Peripheral<P = T> + 'd) -> Self {
|
pub fn new(gpin: impl Peripheral<P = T> + 'd) -> Self {
|
||||||
into_ref!(gpin);
|
into_ref!(gpin);
|
||||||
|
|
||||||
|
#[cfg(feature = "rp2040")]
|
||||||
gpin.gpio().ctrl().write(|w| w.set_funcsel(0x08));
|
gpin.gpio().ctrl().write(|w| w.set_funcsel(0x08));
|
||||||
|
|
||||||
|
// On RP2350 GPIN changed from F8 toF9
|
||||||
|
#[cfg(feature = "_rp235x")]
|
||||||
|
gpin.gpio().ctrl().write(|w| w.set_funcsel(0x09));
|
||||||
|
|
||||||
#[cfg(feature = "_rp235x")]
|
#[cfg(feature = "_rp235x")]
|
||||||
gpin.pad_ctrl().write(|w| {
|
gpin.pad_ctrl().write(|w| {
|
||||||
w.set_iso(false);
|
w.set_iso(false);
|
||||||
@ -938,7 +944,13 @@ impl<'d, T: GpoutPin> Gpout<'d, T> {
|
|||||||
pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self {
|
pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self {
|
||||||
into_ref!(gpout);
|
into_ref!(gpout);
|
||||||
|
|
||||||
|
#[cfg(feature = "rp2040")]
|
||||||
gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08));
|
gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08));
|
||||||
|
|
||||||
|
// On RP2350 GPOUT changed from F8 toF9
|
||||||
|
#[cfg(feature = "_rp235x")]
|
||||||
|
gpout.gpio().ctrl().write(|w| w.set_funcsel(0x09));
|
||||||
|
|
||||||
#[cfg(feature = "_rp235x")]
|
#[cfg(feature = "_rp235x")]
|
||||||
gpout.pad_ctrl().write(|w| {
|
gpout.pad_ctrl().write(|w| {
|
||||||
w.set_iso(false);
|
w.set_iso(false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user