Function drone_cortexm::thr::init[][src]

pub fn init<T: ThrsInitToken>(token: T) -> T::ThrTokens

Initializes the thread system and returns a set of thread tokens.

Examples

use drone_cortexm::{cortexm_reg_tokens, thr};

cortexm_reg_tokens! {
    index => Regs;
    exclude => {
        scb_ccr,
        mpu_type, mpu_ctrl, mpu_rnr, mpu_rbar, mpu_rasr,
    }
}

fn handler(reg: Regs, thr_init: ThrsInit) {
    let thr = thr::init(thr_init);
}