rp: rename gpio::Pin::io to gpio::Pin::gpio

we'll need access to the pin io bank registers for an upcoming fix, and
having both `io` and `io_bank` or similar can get confusing quickly.
rename `io` to `gpio` to avoid this, and also match the type while there.
This commit is contained in:
pennae
2023-07-31 18:28:31 +02:00
parent ebc173ea75
commit e6d4043279
7 changed files with 22 additions and 22 deletions

View File

@ -702,7 +702,7 @@ impl<'d, T: Pin> Gpin<'d, T> {
pub fn new<P: GpinPin>(gpin: impl Peripheral<P = P> + 'd) -> Gpin<'d, P> {
into_ref!(gpin);
gpin.io().ctrl().write(|w| w.set_funcsel(0x08));
gpin.gpio().ctrl().write(|w| w.set_funcsel(0x08));
Gpin {
gpin: gpin.map_into(),
@ -718,7 +718,7 @@ impl<'d, T: Pin> Gpin<'d, T> {
impl<'d, T: Pin> Drop for Gpin<'d, T> {
fn drop(&mut self) {
self.gpin
.io()
.gpio()
.ctrl()
.write(|w| w.set_funcsel(pac::io::vals::Gpio0ctrlFuncsel::NULL as _));
}
@ -766,7 +766,7 @@ impl<'d, T: GpoutPin> Gpout<'d, T> {
pub fn new(gpout: impl Peripheral<P = T> + 'd) -> Self {
into_ref!(gpout);
gpout.io().ctrl().write(|w| w.set_funcsel(0x08));
gpout.gpio().ctrl().write(|w| w.set_funcsel(0x08));
Self { gpout }
}
@ -831,7 +831,7 @@ impl<'d, T: GpoutPin> Drop for Gpout<'d, T> {
fn drop(&mut self) {
self.disable();
self.gpout
.io()
.gpio()
.ctrl()
.write(|w| w.set_funcsel(pac::io::vals::Gpio0ctrlFuncsel::NULL as _));
}