diff options
author | Markus Reiter <me@reitermark.us> | 2024-11-23 22:49:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-23 22:49:30 +0100 |
commit | 0edd5527161809dfbc0c76e39c462e3a4f00beb7 (patch) | |
tree | bb55dd2015752ce100d21682a5f452b9f5c4d208 /src/devices/features/tier1.rs | |
parent | d3af2b6074e8698b8b83f79758e23070a8b80002 (diff) | |
download | ads1x1x-async-0edd5527161809dfbc0c76e39c462e3a4f00beb7.tar.gz ads1x1x-async-0edd5527161809dfbc0c76e39c462e3a4f00beb7.tar.xz ads1x1x-async-0edd5527161809dfbc0c76e39c462e3a4f00beb7.zip |
Improve documentation. (#32)
* Use `non_exhaustive`.
* Improve docs.
Diffstat (limited to 'src/devices/features/tier1.rs')
-rw-r--r-- | src/devices/features/tier1.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/features/tier1.rs b/src/devices/features/tier1.rs index c6aa8cd..3a8beb9 100644 --- a/src/devices/features/tier1.rs +++ b/src/devices/features/tier1.rs @@ -1,4 +1,4 @@ -//! Common functions +//! Features supported on all ADS1x1x devices. use crate::{ic, Ads1x1x, BitFlags as BF, DataRate12Bit, DataRate16Bit, Error, Register}; @@ -6,7 +6,7 @@ impl<I2C, IC, MODE, E> Ads1x1x<I2C, IC, ic::Resolution12Bit, MODE> where I2C: embedded_hal::i2c::I2c<Error = E>, { - /// Set data rate + /// Sets the data rate. pub fn set_data_rate(&mut self, rate: DataRate12Bit) -> Result<(), Error<E>> { use crate::DataRate12Bit as DR; let cfg = self.config.clone(); @@ -29,7 +29,7 @@ impl<I2C, IC, MODE, E> Ads1x1x<I2C, IC, ic::Resolution16Bit, MODE> where I2C: embedded_hal::i2c::I2c<Error = E>, { - /// Set data rate + /// Sets the data rate. pub fn set_data_rate(&mut self, rate: DataRate16Bit) -> Result<(), Error<E>> { use crate::DataRate16Bit as DR; let cfg = self.config.clone(); |