From 0b97844b896356e26960138da8324808faee6bd9 Mon Sep 17 00:00:00 2001 From: Ian McIntyre Date: Sat, 8 Oct 2022 19:22:25 -0400 Subject: [PATCH] Emit RTIC-compatible Peripheral structs Hide the `steal()` method; it's only available for RTIC. Users should call their own `instance()` methods. --- raltool/src/generate/device.rs | 53 ++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/raltool/src/generate/device.rs b/raltool/src/generate/device.rs index 9a5784d26b1a..d8c5f1979b99 100644 --- a/raltool/src/generate/device.rs +++ b/raltool/src/generate/device.rs @@ -68,7 +68,7 @@ pub fn render(_opts: &super::Options, _ir: &IR, d: &Device) -> Result Self { + Self { + #member_inits + } + } + } + }); + Ok(out) }