Closed lukeburong closed 5 months ago
Fixes #142
This introduces a new variant to gpio::Mode called Null (though something like Disabled may be more appropriate - I just stuck with the datasheet).
Null
Disabled
After implementing this, the example code from #142 gives the following results on a Raspberry Pi 5:
pinctrl 25 before:
pinctrl 25
25: no pn | -- // GPIO25 = none
pinctrl 25 after:
25: ip pn | lo // GPIO25 = input
And with set_reset_on_drop(true), the pin mode is restored correctly on drop:
set_reset_on_drop(true)
The new variant shouldn't affect anything not using the RP1 (much like Alt6 - Alt8 which are also only used in rp1.rs)
Alt6
Alt8
rp1.rs
Fixes #142
This introduces a new variant to gpio::Mode called
Null
(though something likeDisabled
may be more appropriate - I just stuck with the datasheet).After implementing this, the example code from #142 gives the following results on a Raspberry Pi 5:
pinctrl 25
before:pinctrl 25
after:And with
set_reset_on_drop(true)
, the pin mode is restored correctly on drop:pinctrl 25
before:pinctrl 25
after:The new variant shouldn't affect anything not using the RP1 (much like
Alt6
-Alt8
which are also only used inrp1.rs
)