Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
/// # Syntax
///
/// ```
/// # use cortex_m_rt_macros::exception;
/// # use cortex_m_rt::exception;
/// #[exception]
/// fn SysTick() {
/// // ..
Expand Down Expand Up @@ -449,10 +449,8 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
}));
f.block.stmts = iter::once(
syn::parse2(quote! {{
extern crate cortex_m_rt;

// check that this exception actually exists
cortex_m_rt::Exception::#ident;
exception::#ident;
}})
.unwrap(),
)
Expand Down Expand Up @@ -619,8 +617,6 @@ pub fn interrupt(args: TokenStream, input: TokenStream) -> TokenStream {
}));
f.block.stmts = iter::once(
syn::parse2(quote! {{
extern crate cortex_m_rt;

// Check that this interrupt actually exists
interrupt::#ident;
}})
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ pub enum Exception {
SysTick,
}

pub use self::Exception as exception;

extern "C" {
fn NonMaskableInt();

Expand Down