You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This also removes the `bare-metal` dependency from PACs created for
MSP430, as requested in
#455 (comment)
Signed-off-by: Daniel Egger <[email protected]>
Copy file name to clipboardExpand all lines: src/generate/interrupt.rs
+42-29Lines changed: 42 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -160,41 +160,54 @@ pub fn render(
160
160
(quote!(#[repr(u8)]),quote!(*#self_token asu8))
161
161
};
162
162
163
-
let interrupt_enum = quote!{
164
-
///Enumeration of all the interrupts
165
-
#[derive(Copy,Clone,Debug,PartialEq,Eq)]
166
-
#enum_repr
167
-
pubenumInterrupt{
168
-
#variants
169
-
}
170
-
171
-
unsafeimpl bare_metal::NrforInterrupt{
172
-
#[inline(always)]
173
-
fn nr(&#self_token) -> u8{
174
-
#nr_expr
163
+
if target == Target::Msp430{
164
+
let interrupt_enum = quote!{
165
+
///Enumeration of all the interrupts. This enum is seldom used in application or library crates. It is present primarily for documenting the device's implemented interrupts.
166
+
#[derive(Copy,Clone,Debug,PartialEq,Eq)]
167
+
#enum_repr
168
+
pubenumInterrupt{
169
+
#variants
175
170
}
176
-
}
177
-
};
171
+
};
178
172
179
-
if target == Target::CortexM || target == Target::Msp430{
0 commit comments