1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Register an interrupt handler
//!
//! NOTE Requires a device crate generated using `svd2rust`
//!
//! ```
//! 
//! #![feature(used)]
//! #![no_std]
//! 
//! extern crate cortex_m;
//! extern crate cortex_m_rt;
//! // NOTE this is the device crate
//! extern crate stm32f30x;
//! 
//! use cortex_m::asm;
//! use stm32f30x::interrupt;
//! 
//! fn main() {}
//! 
//! // NOTE each interrupt handler has a different signature
//! extern "C" fn my_interrupt_handler(_ctxt: interrupt::Tim7) {
//!     asm::bkpt();
//! }
//! 
//! extern "C" fn another_interrupt_handler(_ctxt: interrupt::Exti0) {
//!     asm::bkpt();
//! }
//! 
//! // Here we override only two interrupt handlers, the rest of interrupt are
//! // handled by the same interrupt handler
//! #[allow(dead_code)]
//! #[used]
//! #[link_section = ".rodata.interrupts"]
//! static INTERRUPTS: interrupt::Handlers = interrupt::Handlers {
//!     Tim7: my_interrupt_handler,
//!     Exti0: another_interrupt_handler,
//!     ..interrupt::DEFAULT_HANDLERS
//! };
//! ```
// Auto-generated. Do not modify.