summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/types.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/types.rs b/src/types.rs
index 5ceabc4..2b9fc02 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -259,8 +259,8 @@ pub struct Ads1x1x<DI, IC, CONV, MODE> {
#[cfg(test)]
mod tests {
- use crate::SlaveAddr;
use crate::DEVICE_BASE_ADDRESS as ADDR;
+ use crate::{FullScaleRange, SlaveAddr};
#[test]
fn can_get_default_address() {
@@ -283,4 +283,9 @@ mod tests {
assert_eq!(0b100_1010, SlaveAddr::new_sda().addr(ADDR));
assert_eq!(0b100_1011, SlaveAddr::new_scl().addr(ADDR));
}
+
+ #[test]
+ fn default_full_scale_range() {
+ assert_eq!(FullScaleRange::Within2_048V, FullScaleRange::default());
+ }
}