ds323x 0.7.0

Platform-agnostic Rust driver for the DS3231, DS3232 and DS3234 extremely accurate real-time clocks (RTC).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod common;
use self::common::{
    destroy_ds3231, destroy_ds3232, destroy_ds3234, new_ds3231, new_ds3232, new_ds3234,
};

macro_rules! construction_test {
    ($name:ident, $create:ident, $destroy:ident) => {
        #[test]
        fn $name() {
            let dev = $create(&[]);
            $destroy(dev);
        }
    };
}

construction_test!(can_create_ds3231, new_ds3231, destroy_ds3231);
construction_test!(can_create_ds3232, new_ds3232, destroy_ds3232);
construction_test!(can_create_ds3234, new_ds3234, destroy_ds3234);