Skip to content

Commit

Permalink
Merge pull request #695 from jannic/rename_inner_read
Browse files Browse the repository at this point in the history
Rename private function Adc::read to Adc::inner_read
  • Loading branch information
jannic authored Sep 27, 2023
2 parents 43ddad5 + 5442656 commit fcebdea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rp2040-hal/src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl Adc {
}
}

fn read(&mut self, chan: u8) -> u16 {
fn inner_read(&mut self, chan: u8) -> u16 {
while !self.device.cs.read().ready().bit_is_set() {
cortex_m::asm::nop();
}
Expand Down Expand Up @@ -327,7 +327,7 @@ where
fn read(&mut self, _pin: &mut SRC) -> nb::Result<WORD, Self::Error> {
let chan = SRC::channel();

Ok(self.read(chan).into())
Ok(self.inner_read(chan).into())
}
}

Expand All @@ -351,7 +351,7 @@ where
return Err(nb::Error::Other(InvalidPinError));
};

Ok(self.read(chan).into())
Ok(self.inner_read(chan).into())
}
}

Expand Down

0 comments on commit fcebdea

Please sign in to comment.