summaryrefslogtreecommitdiff
path: root/stm32-metapac-gen
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-02-09 00:58:17 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-02-09 00:58:17 +0100
commit8160af6af99573d3ef66aede8c4b0aac033b0ff3 (patch)
treeb48576bafeaaab3f848fc7af6000c120cfe3652e /stm32-metapac-gen
parentd1a968042279152fd8f342406fe89cbe7ad6ce48 (diff)
downloadembassy-8160af6af99573d3ef66aede8c4b0aac033b0ff3.zip
stm32: replace `peripheral_rcc!` macrotable with build.rs
Diffstat (limited to 'stm32-metapac-gen')
-rw-r--r--stm32-metapac-gen/src/lib.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/stm32-metapac-gen/src/lib.rs b/stm32-metapac-gen/src/lib.rs
index ccf737ef..10d67869 100644
--- a/stm32-metapac-gen/src/lib.rs
+++ b/stm32-metapac-gen/src/lib.rs
@@ -126,7 +126,6 @@ pub fn gen_chip(
let mut interrupt_table: Vec<Vec<String>> = Vec::new();
let mut peripherals_table: Vec<Vec<String>> = Vec::new();
let mut peripheral_pins_table: Vec<Vec<String>> = Vec::new();
- let mut peripheral_rcc_table: Vec<Vec<String>> = Vec::new();
let mut dma_channels_table: Vec<Vec<String>> = Vec::new();
let mut peripheral_dma_channels_table: Vec<Vec<String>> = Vec::new();
let mut peripheral_counts: BTreeMap<String, u8> = BTreeMap::new();
@@ -264,34 +263,6 @@ pub fn gen_chip(
}
_ => {}
}
-
- if let Some(rcc) = &p.rcc {
- let mut clock = rcc.clock.to_ascii_lowercase();
- if p.name.starts_with("TIM") {
- clock = format!("{}_tim", clock)
- }
-
- let mut row = Vec::new();
- row.push(p.name.clone());
- row.push(bi.kind.clone());
- row.push(bi.block.clone());
- row.push(clock);
-
- for reg in [&rcc.enable, &rcc.reset] {
- if let Some(reg) = reg {
- row.push(format!(
- "({}, {}, set_{})",
- reg.register.to_ascii_lowercase(),
- reg.field.to_ascii_lowercase(),
- reg.field.to_ascii_lowercase()
- ));
- } else {
- row.push("_".to_string())
- }
- }
-
- peripheral_rcc_table.push(row);
- }
}
dev.peripherals.push(ir_peri);
@@ -422,7 +393,6 @@ pub fn gen_chip(
"peripheral_dma_channels",
&peripheral_dma_channels_table,
);
- make_table(&mut data, "peripheral_rcc", &peripheral_rcc_table);
make_table(&mut data, "dma_channels", &dma_channels_table);
make_table(&mut data, "dbgmcu", &dbgmcu_table);
make_peripheral_counts(&mut data, &peripheral_counts);