mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2025-11-04 15:44:10 +00:00
enabled RTC
This commit is contained in:
parent
fb8d98da28
commit
7d78aa8c4c
@ -52,7 +52,7 @@ pub async fn rtc_config(i2c: I2c<'static, Async>) -> DS3231<I2c<'static, Async>>
|
|||||||
square_wave_frequency: SquareWaveFrequency::Hz1,
|
square_wave_frequency: SquareWaveFrequency::Hz1,
|
||||||
interrupt_control: InterruptControl::Interrupt, // Enable interrupt mode
|
interrupt_control: InterruptControl::Interrupt, // Enable interrupt mode
|
||||||
battery_backed_square_wave: false,
|
battery_backed_square_wave: false,
|
||||||
oscillator_enable: Oscillator::Disabled,
|
oscillator_enable: Oscillator::Enabled,
|
||||||
};
|
};
|
||||||
|
|
||||||
match rtc.configure(&rtc_config).await {
|
match rtc.configure(&rtc_config).await {
|
||||||
@ -83,5 +83,8 @@ pub async fn rtc_config(i2c: I2c<'static, Async>) -> DS3231<I2c<'static, Async>>
|
|||||||
}
|
}
|
||||||
Err(e) => info!("Failed to read status: {:?}", e),
|
Err(e) => info!("Failed to read status: {:?}", e),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info!("RTC time is: {:?}", rtc.datetime().await.unwrap());
|
||||||
|
|
||||||
rtc
|
rtc
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user