2019-06-13 23:56:59 +02:00
|
|
|
//! [compile-pass] 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]
|
|
|
|
|
2019-06-13 23:56:59 +02:00
|
|
|
use panic_halt as _;
|
2019-02-23 21:50:52 +01:00
|
|
|
|
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
|
|
|
|
2019-06-20 06:19:59 +02:00
|
|
|
// Cortex-M exception
|
|
|
|
#[task(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
|
|
|
|
2019-06-20 06:19:59 +02:00
|
|
|
// LM3S6965 interrupt
|
|
|
|
#[task(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) {}
|