mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 14:44:32 +00:00
fix wrong funcsel on rp2350 gpout/gpin
This commit is contained in:
parent
9d672c44d1
commit
f15c587887
@ -854,7 +854,14 @@ 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 +945,14 @@ 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