Skip to content
Snippets Groups Projects
Select Git revision
  • 8a396c51f2caaeca7ee0f81ef2f3c4f2f73d8df1
  • master default protected
  • exam
  • exper
  • klee
  • simple
  • v0.3.2
  • v0.3.1
  • v0.3.0
  • v0.2.2
  • v0.2.1
  • v0.2.0
  • v0.1.1
  • v0.1.0
14 results

init-resource-share-task.rs

Blame
  • init-resource-share-task.rs 584 B
    #![deny(warnings)]
    #![feature(proc_macro)]
    #![no_std]
    
    extern crate cortex_m_rtfm as rtfm;
    extern crate stm32f103xx;
    
    use rtfm::app;
    
    app! { //~ proc macro panicked
        device: stm32f103xx,
    
        resources: {
            static BUFFER: [u8; 16] = [0; 16];
        },
    
        init: {
            resources: [BUFFER],
        },
    
        tasks: {
            SYS_TICK: {
                path: sys_tick,
                // ERROR resources assigned to `init` can't be shared with tasks
                resources: [BUFFER],
            },
        },
    }
    
    fn init(_p: init::Peripherals) {}
    
    fn idle() -> ! {
        loop {}
    }
    
    fn sys_tick() {}