2019-02-23 21:50:52 +01:00
|
|
|
//! Check that `binds` works as advertised
|
2019-04-21 20:13:15 +02:00
|
|
|
#![deny(unsafe_code)]
|
|
|
|
#![deny(warnings)]
|
2019-02-23 21:50:52 +01:00
|
|
|
#![no_main]
|
|
|
|
#![no_std]
|
|
|
|
|
|
|
|
extern crate lm3s6965;
|
|
|
|
extern crate panic_halt;
|
|
|
|
extern crate rtfm;
|
|
|
|
|
2019-04-21 20:13:15 +02:00
|
|
|
#[rtfm::app(device = lm3s6965)]
|
2019-02-23 21:50:52 +01:00
|
|
|
const APP: () = {
|
|
|
|
#[init]
|
2019-04-21 20:13:15 +02:00
|
|
|
fn init(_: init::Context) {}
|
2019-02-23 21:50:52 +01:00
|
|
|
|
|
|
|
#[exception(binds = SVCall)]
|
2019-04-21 20:13:15 +02:00
|
|
|
fn foo(c: foo::Context) {
|
|
|
|
foo_trampoline(c)
|
|
|
|
}
|
2019-02-23 21:50:52 +01:00
|
|
|
|
|
|
|
#[interrupt(binds = UART0)]
|
2019-04-21 20:13:15 +02:00
|
|
|
fn bar(c: bar::Context) {
|
|
|
|
bar_trampoline(c)
|
|
|
|
}
|
2019-02-23 21:50:52 +01:00
|
|
|
};
|
|
|
|
|
2019-02-23 21:56:05 +01:00
|
|
|
#[allow(dead_code)]
|
2019-02-23 21:50:52 +01:00
|
|
|
fn foo_trampoline(_: foo::Context) {}
|
|
|
|
|
2019-02-23 21:56:05 +01:00
|
|
|
#[allow(dead_code)]
|
2019-02-23 21:50:52 +01:00
|
|
|
fn bar_trampoline(_: bar::Context) {}
|