Skip to content

Commit

Permalink
Simplify docs for FullScaleRange.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jan 19, 2024
1 parent 451f9fb commit 85e8336
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,26 @@ pub enum ComparatorQueue {
#[derive(Clone, Copy, Debug, PartialEq)]
#[allow(non_camel_case_types)]
pub enum FullScaleRange {
/// The measurable range is ±6.144V.
/// ±6.144V
Within6_144V,
/// The measurable range is ±4.096V.
/// ±4.096V
Within4_096V,
/// The measurable range is ±2.048V. (default)
/// ±2.048V (default)
Within2_048V,
/// The measurable range is ±1.024V.
/// ±1.024V
Within1_024V,
/// The measurable range is ±0.512V.
/// ±0.512V
Within0_512V,
/// The measurable range is ±0.256V.
/// ±0.256V
Within0_256V,
}

impl Default for FullScaleRange {
fn default() -> Self {
FullScaleRange::Within2_048V
}
}

/// Possible slave addresses
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum SlaveAddr {
Expand Down Expand Up @@ -242,12 +248,6 @@ impl Default for Config {
}
}

impl Default for FullScaleRange {
fn default() -> Self {
FullScaleRange::Within2_048V
}
}

/// ADS1x1x ADC driver
#[derive(Debug, Default)]
pub struct Ads1x1x<DI, IC, CONV, MODE> {
Expand Down

0 comments on commit 85e8336

Please sign in to comment.