Skip to content

Commit

Permalink
Added ead_voltage method to ADC
Browse files Browse the repository at this point in the history
  • Loading branch information
David-OConnor committed Oct 31, 2023
1 parent 24057d3 commit c61e221
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,11 @@ macro_rules! hal {
self.read_result()
}

pub fn read_voltage(&mut self, channel: u8) -> f32 {
let reading = self.read(channel);
self.reading_to_voltage(reading)
}


/// Select and activate a trigger. See G4 RM, section 21.4.18:
/// Conversion on external trigger and trigger polarit
Expand Down

0 comments on commit c61e221

Please sign in to comment.