summaryrefslogtreecommitdiff
path: root/src/ds3231.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ds3231.rs')
-rw-r--r--src/ds3231.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ds3231.rs b/src/ds3231.rs
index 6b20958..0e1d561 100644
--- a/src/ds3231.rs
+++ b/src/ds3231.rs
@@ -22,8 +22,9 @@ pub struct Date {
}
impl<'a> DS3231<'a> {
- pub fn new(i2c_reg: &'a stm32f103xx::i2c1::RegisterBlock) -> DS3231<'a> {
- DS3231{i2c: I2C::new(i2c_reg)}
+ pub fn new(i2c_reg: &'a stm32f103xx::i2c1::RegisterBlock,
+ rcc_reg: &'a stm32f103xx::rcc::RegisterBlock) -> DS3231<'a> {
+ DS3231{i2c: I2C::new(i2c_reg, rcc_reg)}
}
fn bcd2dec(bcd: u8) -> u8 {