Skip to content

Commit fc62243

Browse files
committed
Rename adc::OneShot::try_read method
1 parent 8e83e4b commit fc62243

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/adc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub trait Channel<ADC> {
7676
/// {
7777
/// type Error = ();
7878
///
79-
/// fn read(&mut self, _pin: &mut PIN) -> nb::Result<WORD, Self::Error> {
79+
/// fn try_read(&mut self, _pin: &mut PIN) -> nb::Result<WORD, Self::Error> {
8080
/// let chan = 1 << PIN::channel();
8181
/// self.power_up();
8282
/// let result = self.do_conversion(chan);
@@ -94,5 +94,5 @@ pub trait OneShot<ADC, Word, Pin: Channel<ADC>> {
9494
///
9595
/// This method takes a `Pin` reference, as it is expected that the ADC will be able to sample
9696
/// whatever channel underlies the pin.
97-
fn read(&mut self, pin: &mut Pin) -> nb::Result<Word, Self::Error>;
97+
fn try_read(&mut self, pin: &mut Pin) -> nb::Result<Word, Self::Error>;
9898
}

0 commit comments

Comments
 (0)