diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-17 08:20:22 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-17 08:20:22 +0100 |
commit | 8724ff8565d56bfd88a2bfb397839059884fdab6 (patch) | |
tree | e368b63fcfbfcc5f50545441a8559c39250c0e2f /src/lib.rs | |
parent | e012a0a1d7f5f0c46b3d4cc1136160c1762cb63b (diff) | |
download | ads1x1x-async-8724ff8565d56bfd88a2bfb397839059884fdab6.tar.gz ads1x1x-async-8724ff8565d56bfd88a2bfb397839059884fdab6.tar.xz ads1x1x-async-8724ff8565d56bfd88a2bfb397839059884fdab6.zip |
Enhance type capabilities
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -192,7 +192,7 @@ pub mod mode { } /// Data rate for ADS1013, ADS1014, ADS1015, ADS1018 -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum DataRate12Bit { /// 128 SPS Sps128, @@ -212,7 +212,7 @@ pub enum DataRate12Bit { /// Data rate for ADS1113, ADS1114, ADS1115, ADS1118 -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum DataRate16Bit { /// 8 SPS Sps8, @@ -232,7 +232,7 @@ pub enum DataRate16Bit { Sps860 } /// Comparator mode (only for ADS1x14, ADS1x15) -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum ComparatorMode { /// Traditional comparator (default) /// @@ -250,7 +250,7 @@ pub enum ComparatorMode { } /// Comparator polarity (only for ADS1x14, ADS1x15) -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum ComparatorPolarity { /// Active low (default) ActiveLow, @@ -263,7 +263,7 @@ pub enum ComparatorPolarity { /// Select whether the ALERT/RDY pin latches after being asserted or clears /// after conversions are within the margin of the upper and lower /// threshold values. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum ComparatorLatching { /// Nonlatching (default) /// @@ -282,7 +282,7 @@ pub enum ComparatorLatching { /// /// The default state of the comparator is deactivated. It can be activated by setting /// the comparator queue. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum ComparatorQueue { /// Activate comparator and assert after one conversion exceeding thresholds One, @@ -296,7 +296,7 @@ pub enum ComparatorQueue { /// /// This sets the input voltage measurable range. /// The FSR is fixed at ±2.048 V in the ADS1x13. -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, PartialEq)] #[allow(non_camel_case_types)] pub enum FullScaleRange { /// The measurable range is ±6.144V. @@ -314,7 +314,7 @@ pub enum FullScaleRange { } /// Possible slave addresses -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum SlaveAddr { /// Default slave address Default, |