Skip to content

Commit e03127a

Browse files
committed
working?
1 parent ac43273 commit e03127a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/generate/device.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn render(_opts: &super::Options, ir: &IR, d: &Device, path: &str) -> Result
6161
addrs
6262
.entry((block_name, path))
6363
.or_default()
64-
.push((address.clone(), name.clone()));
64+
.push((p.base_address, p.name.clone()));
6565

6666
let path = util::relative_path(block_name, path);
6767

@@ -84,12 +84,12 @@ pub fn render(_opts: &super::Options, ir: &IR, d: &Device, path: &str) -> Result
8484

8585
let addrs = addrs
8686
.iter()
87-
.map(|(addr, block_name)| quote!(#addr => f.write_str(#block_name),));
87+
.map(|(addr, name)| quote! { #addr => f.write_str(#name), });
8888

8989
peripherals.extend(quote! {
9090
impl core::fmt::Display for #path {
91-
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), core::fmt::Error> {
92-
match self.0 {
91+
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
92+
match self.0 as _ {
9393
#(
9494
#addrs
9595
)*

0 commit comments

Comments
 (0)