From 7ac25f537bb7684be136e0168bbad2a85922b3fc Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sat, 17 Nov 2018 14:24:13 +0100 Subject: Improve documentation of values --- src/devices/features/tier2.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/devices/features') diff --git a/src/devices/features/tier2.rs b/src/devices/features/tier2.rs index 2a35f7c..79843f6 100644 --- a/src/devices/features/tier2.rs +++ b/src/devices/features/tier2.rs @@ -32,12 +32,22 @@ where } /// Set raw comparator lower threshold + /// + /// The input value must be within `[2047..-2048]` for 12-bit devices (`ADS101x`) + /// and within `[32767..-32768]` for 16-bit devices (`ADS111x`). The voltage that + /// these values correspond to must be calculated using the full-scale range + /// selected. See [`FullScaleRange`](enum.FullScaleRange.html). pub fn set_low_threshold_raw(&mut self, value: i16) -> Result<(), Error> { let register_value = CONV::convert_threshold(value)?; self.iface.write_register(Register::LOW_TH, register_value) } /// Set raw comparator upper threshold + /// + /// The input value must be within `[2047..-2048]` for 12-bit devices (`ADS101x`) + /// and within `[32767..-32768]` for 16-bit devices (`ADS111x`). The voltage that + /// these values correspond to must be calculated using the full-scale range + /// selected. See [`FullScaleRange`](enum.FullScaleRange.html). pub fn set_high_threshold_raw(&mut self, value: i16) -> Result<(), Error> { let register_value = CONV::convert_threshold(value)?; self.iface.write_register(Register::HIGH_TH, register_value) -- cgit v1.2.3-54-g00ecf