get_time_ms: ADC sampling takes NSH+12 cycles and not NSH

This commit is contained in:
Sebastien Bourdeauducq 2017-08-07 11:25:39 +08:00
parent 5ef86b4516
commit dcd2a57aa4
1 changed files with 1 additions and 2 deletions

View File

@ -53,8 +53,7 @@ fn get_time_ms() -> u64 {
let adc_irq_count = cortex_m::interrupt::free(|cs| {
ADC_IRQ_COUNT.borrow(cs).get()
});
// FIXME: this should be adc_irq_count*6/125
adc_irq_count*4*6/125
adc_irq_count*24/125
}
static LOOP_ANODE: Mutex<RefCell<loop_anode::Controller>> = Mutex::new(RefCell::new(