Add is_running to eneble/disable example

pull/4/head
Diego Barrios Romero 2018-10-31 07:08:59 +01:00
parent 672cd40b54
commit 1f3d060332
1 changed files with 3 additions and 0 deletions

View File

@ -269,7 +269,10 @@
//! let dev = hal::I2cdev::new("/dev/i2c-1").unwrap();
//! let mut rtc = Ds323x::new_ds3231(dev);
//! rtc.disable().unwrap(); // stops the clock
//! let is_running = rtc.is_running().unwrap();
//! println!("Is running: {}", is_running); // will print false
//! rtc.enable().unwrap(); // set clock to run
//! println!("Is running: {}", is_running); // will print true
//! # }
//! ```
//!