cortex-m-quickstart 0.1.1

A template for building applications for ARM Cortex-M microcontrollers
//! Register an interrupt handler
//! NOTE Requires a device crate generated using `svd2rust`


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) {

extern "C" fn another_interrupt_handler(_ctxt: interrupt::Exti0) {

// Here we override only two interrupt handlers, the rest of interrupt are
// handled by the same interrupt handler
#[link_section = ".rodata.interrupts"]
static INTERRUPTS: interrupt::Handlers = interrupt::Handlers {
    Tim7: my_interrupt_handler,
    Exti0: another_interrupt_handler,