Skip to content

Commit 9579237

Browse files
committed
Allow multiple level of deriveFrom peripherals.
1 parent 4397640 commit 9579237

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/generate/peripheral.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ pub fn render(
9191
// Derived peripherals may not require re-implementation, and will instead
9292
// use a single definition of the non-derived version.
9393
if derive_regs {
94+
// re-export the base module to allow deriveFrom this one
95+
out.extend(quote! {
96+
#[doc = #description]
97+
pub use #base as #name_sc;
98+
});
9499
return Ok(out);
95100
}
96101

0 commit comments

Comments
 (0)