diff options
author | Tyler Slabinski <tslabinski@slabity.net> | 2024-05-23 16:17:17 -0400 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2024-07-31 09:51:44 +0200 |
commit | 82e32d0c0ccceeaa30c99d98b36ef7d9d41b8978 (patch) | |
tree | 350bfe5cef8324f82b5e2face0250cafc75bee5a | |
parent | 00830f4e5569a381afbdfce270e478c5fd25401f (diff) | |
download | ads1x1x-async-82e32d0c0ccceeaa30c99d98b36ef7d9d41b8978.tar.gz ads1x1x-async-82e32d0c0ccceeaa30c99d98b36ef7d9d41b8978.tar.xz ads1x1x-async-82e32d0c0ccceeaa30c99d98b36ef7d9d41b8978.zip |
Set comparator to default on continuous pulse
-rw-r--r-- | src/devices/features/tier2.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/features/tier2.rs b/src/devices/features/tier2.rs index 4eb989e..5f25b41 100644 --- a/src/devices/features/tier2.rs +++ b/src/devices/features/tier2.rs @@ -143,7 +143,7 @@ where /// provides a continuous-conversion ready pulse when in /// continuous-conversion mode. /// - /// When calling this the comparator will be disabled and the thresholds will be cleared. + /// When calling this the comparator will be reset to default and the thresholds will be cleared. pub fn use_alert_rdy_pin_as_ready(&mut self) -> Result<(), Error<E>> { if self.config != self @@ -151,7 +151,7 @@ where .with_high(BF::COMP_QUE1) .with_high(BF::COMP_QUE0) { - self.disable_comparator()?; + self.set_comparator_queue(ComparatorQueue::default())?; } self.write_register(Register::HIGH_TH, 0x8000)?; self.write_register(Register::LOW_TH, 0) |