From 3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sun, 11 Nov 2018 08:04:42 +0100 Subject: Reorganize modules --- src/devices/ic.rs | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/devices/ic.rs (limited to 'src/devices/ic.rs') diff --git a/src/devices/ic.rs b/src/devices/ic.rs deleted file mode 100644 index 7b30f85..0000000 --- a/src/devices/ic.rs +++ /dev/null @@ -1,42 +0,0 @@ -/// ICs -use private; - -#[derive(PartialEq)] -pub enum ResolutionBits { - _12, - _16 -} - -pub trait Resolution : private::Sealed { - const BITS : ResolutionBits; -} - -macro_rules! ic_marker { - ($name:ident, $resolution:ident) => { - /// IC marker - pub struct $name(()); - impl Resolution for $name { - const BITS: ResolutionBits = ResolutionBits::$resolution; - } - }; -} - -ic_marker!(Ads1013, _12); -ic_marker!(Ads1113, _16); -ic_marker!(Ads1014, _12); -ic_marker!(Ads1114, _16); -ic_marker!(Ads1015, _12); -ic_marker!(Ads1115, _16); - -pub trait Tier2Features : private::Sealed { } - -macro_rules! tier2_features { - ($name:ident) => { - impl Tier2Features for $name {} - } -} - -tier2_features!(Ads1014); -tier2_features!(Ads1114); -tier2_features!(Ads1015); -tier2_features!(Ads1115); -- cgit v1.2.3-54-g00ecf