mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add helper function to extract bcd time values
This commit is contained in:
parent
e479de4e02
commit
4800cca65e
1 changed files with 1 additions and 1 deletions
|
|
@ -282,6 +282,6 @@ pub fn rtc_to_seconds(settings: &[u8]) -> Option<u64> {
|
||||||
Some(total_secs)
|
Some(total_secs)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_binary(bcd: u8) -> u8 {
|
pub fn to_binary(bcd: u8) -> u8 {
|
||||||
(bcd & 0xf) + ((bcd >> 4) * 10)
|
(bcd & 0xf) + ((bcd >> 4) * 10)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue