diff options
Diffstat (limited to 'src/devices/r820t.rs')
| -rw-r--r-- | src/devices/r820t.rs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/devices/r820t.rs b/src/devices/r820t.rs index 70fad38..ffea7a0 100644 --- a/src/devices/r820t.rs +++ b/src/devices/r820t.rs @@ -1,8 +1,27 @@ -use super::Device; +use super::{DeviceInfo, Actions}; -pub const R820T: Device = Device { +pub struct R820T { + device: DeviceInfo +} + +pub const DEVICE_INFO: DeviceInfo = DeviceInfo { + id: "r820t", name: "Rafael Micro R820T", i2c_addr: 0x34, check_addr: 0x00, check_val: 0x69 }; + +impl R820T { + fn new() -> R820T { + R820T { + device: DEVICE_INFO + } + } +} + +impl Actions for R820T { + fn init(&self) { + println!("Init {}", self.device.name); + } +} |
