Skip to content

Commit 5abebff

Browse files
committed
Removing datetime utils for now, as im not sure where they fit in yet
1 parent c7bc404 commit 5abebff

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

examples/rtc.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use hal::rtc::Rtc;
2222
use hal::rtc::Time;
2323
use hal::rtc::Date;
2424
use hal::pwr::Pwr;
25-
use hal::datetime::*;
2625
use rt::ExceptionFrame;
2726

2827
use core::fmt::Write;
@@ -51,17 +50,19 @@ fn main() -> ! {
5150
let mut timer = Delay::new(cp.SYST, clocks);
5251
let mut pwr = Pwr::pwr(&mut rcc.apb1r1);
5352
let rtc = Rtc::rtc(dp.RTC, &mut rcc.apb1r1, &mut rcc.bdcr, &mut pwr.cr1);
54-
let time = Time::new(21, 57, 32, false);
55-
let date = Date::new(1, 24, 4, 2018);
53+
54+
let mut time = Time::new(21, 57, 32, false);
55+
let mut date = Date::new(1, 24, 4, 2018);
56+
5657
rtc.set_time(&time);
5758
rtc.set_date(&date);
5859

5960
timer.delay_ms(1000_u32);
6061
timer.delay_ms(1000_u32);
6162
timer.delay_ms(1000_u32);
6263

63-
let _time = rtc.get_time();
64-
let _date = rtc.get_date();
64+
time = rtc.get_time();
65+
date = rtc.get_date();
6566

6667

6768
writeln!(hstdout, "Good bye!").unwrap();

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ pub mod gpio;
2222
pub mod delay;
2323
pub mod timer;
2424
pub mod spi;
25-
pub mod datetime;
2625
pub mod rtc;
2726
pub mod pwr;
27+
// pub mod datetime;
2828

2929

3030
#[cfg(test)]

src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ pub use flash::FlashExt as _FlashExtHal;
55
pub use gpio::GpioExt as _GpioExtHal;
66
pub use hal::prelude::*; // embedded hal traits
77
pub use time::U32Ext as _stm32f30x_hal_time_U32Ext;
8-
pub use datetime::U32Ext as _stm32f30x_hal_datetime_U32Ext;
8+
// pub use datetime::U32Ext as _stm32f30x_hal_datetime;
99
pub use dma::DmaExt as _DmaExtHal;

src/rtc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// RTC peripheral abstraction
22
3-
use datetime::*;
3+
// use datetime::*;
44
use rcc::{BDCR, APB1R1};
55
use pwr;
66
use stm32l4::stm32l4x2::{RTC};

0 commit comments

Comments
 (0)