Skip to content

Commit

Permalink
Improve docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jan 15, 2024
1 parent 8026e0e commit 2c61277
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/devices/features/tier2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,18 @@ macro_rules! impl_tier2_features {
Ok(())
}

/// Sets the ALERT/RDY pin as conversion-ready pin.
/// Enables the ALERT/RDY pin as conversion-ready function.
///
/// This the ALERT/RDY pin outputs the OS bit when in OneShot mode, and
/// provides a continuous-conversion ready pulse when in
/// continuous-conversion mode.
/// When in one-shot mode, this makes the ALERT/RDY pin output the OS bit,
/// in continuous-conversion mode, provides a continuous-conversion ready pulse when.
///
/// When calling this the comparator will be disabled and the thresholds will be cleared.
/// When calling this the comparator will be disabled and any thresholds will be cleared.
pub fn use_alert_rdy_pin_as_ready(&mut self) -> Result<(), E> {
if self.config
!= self
.config
.union(Config::COMP_QUE1)
.union(Config::COMP_QUE0)
if !self.config.contains(Config::COMP_QUE)
{
self.disable_comparator()?;
}
self.write_reg_u16(HiThresh(0x8000))?;
self.write_reg_u16(HiThresh(0b1000000000000000))?;
self.write_reg_u16(LoThresh(0))
}
}
Expand Down

0 comments on commit 2c61277

Please sign in to comment.