Skip to content

Commit 3de2114

Browse files
committed
add all-groups
1 parent a6092d2 commit 3de2114

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/generate/interrupt.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ pub fn render(
2525
match p {
2626
Peripheral::Single(info) => info.name.clone(),
2727
Peripheral::Array(info, dim_element) => {
28-
svd_rs::array::names(info, dim_element)
29-
.next()
30-
.unwrap()
31-
.into()
28+
svd_rs::array::names(info, dim_element).next().unwrap()
3229
}
3330
}
3431
})

src/main.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ fn run() -> Result<()> {
245245
.iter()
246246
.map(|s| format!("{s} = []\n")),
247247
);
248+
let add_groups: Vec<_> = util::group_names(&device)
249+
.iter()
250+
.map(|s| format!("\"{s}\""))
251+
.collect();
252+
features.push(format!("all-groups = [{}]\n", add_groups.join(",")))
248253
}
249254
if feature_peripheral {
250255
features.extend(
@@ -257,7 +262,7 @@ fn run() -> Result<()> {
257262
.map(|s| format!("\"{s}\""))
258263
.collect();
259264
features.push(format!(
260-
"all_peripherals = [{}]\n",
265+
"all-peripherals = [{}]\n",
261266
add_peripherals.join(",")
262267
))
263268
}

0 commit comments

Comments
 (0)