Merge pull request #264 from xoviat/rtc

generate rccperipheral for rtc
This commit is contained in:
xoviat 2023-09-25 21:07:21 +00:00 committed by GitHub
commit 1551a1c01a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,6 +26,8 @@ impl PeripheralToClock {
};
for field in &body.fields {
if let Some(peri) = field.name.strip_suffix("EN") {
let peri = if peri == "RTCAPB" { "RTC" } else { peri };
// Timers are a bit special, they may have a x2 freq
let peri_clock = {
if regex!(r"^TIM\d+$").is_match(peri) {