[][src]Function drone_cortexm::thr::init_extended

pub fn init_extended<T: ThrsInitToken>(
    _token: T
) -> (T::ThrTokens, ThrInitExtended)

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

Examples

use drone_cortexm::{cortexm_reg_tokens, reg::prelude::*, thr};

cortexm_reg_tokens! {
    struct Regs;
    !scb_ccr;
    !mpu_type; !mpu_ctrl; !mpu_rnr; !mpu_rbar; !mpu_rasr;
}

fn handler(reg: Regs, thr_init: ThrsInit) {
    let (thr, extended) = thr::init_extended(thr_init);
    extended.scb_ccr_div_0_trp.set_bit();
}