diff options
Diffstat (limited to 'tests/cpass/late-resource.rs')
| -rw-r--r-- | tests/cpass/late-resource.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/cpass/late-resource.rs b/tests/cpass/late-resource.rs new file mode 100644 index 0000000..43f5170 --- /dev/null +++ b/tests/cpass/late-resource.rs @@ -0,0 +1,22 @@ +//! Runtime initialized resources +#![feature(extern_crate_item_prelude)] // ??? +#![no_main] +#![no_std] + +extern crate lm3s6965; +extern crate panic_halt; +extern crate rtfm; + +use rtfm::app; + +#[app(device = lm3s6965)] +const APP: () = { + static mut X: u32 = (); + static Y: u32 = (); + + #[init] + fn init() { + X = 0; + Y = 1; + } +}; |
