pub fn enable_interrupt(&mut self, compare_num: u8) {
        self.regs.intenset.write(|w| match compare_num {
            0 => w.compare0().set(),
            1 => w.compare1().set(),
            2 => w.compare2().set(),
            3 => w.compare3().set(),
            // 4 => w.compare4().set(),
            // 5=> w.compare5().set(),
            _ => panic!("compare number must be 0 - 5"),
            // todo: compare4 and 5 for the other timers??
        });
    }
/// Enable the Timer interrupt for a given compar number.
Enable the Timer interrupt for a given compar number.
Enable the Timer interrupt for a given compar number .
pub fn enable_interrupt(&mut self, compare_num: u8) {
        self.regs.intenset.write(|w| match compare_num {
            0 => w.compare0().set(),
            1 => w.compare1().set(),
            2 => w.compare2().set(),
            3 => w.compare3().set(),
            // 4 => w.compare4().set(),
            // 5=> w.compare5().set(),
            _ => panic!("compare number must be 0 - 5"),
            // todo: compare4 and 5 for the other timers??
        });
    }
pub fn enable_interrupt ( & mut self , compare_num : u8 ) { self . regs . intenset . write ( | w | match compare_num { 0 => w . compare0 ( ) . set ( ) , 1 => w . compare1 ( ) . set ( ) , 2 => w . compare2 ( ) . set ( ) , 3 => w . compare3 ( ) . set ( ) , // 4 => w.compare4().set(), // 5=> w.compare5().set(), _ => panic ! ( " " ) , // todo: compare4 and 5 for the other timers?? } ) ; }
Enable the Timer interrupt for a given compar number.
Enable the Timer interrupt for a given compar number .
&mut self
compare_num
u8
&mut self
compare_num
u8