void radiotimer_setPeriod(PORT_RADIOTIMER_WIDTH period) { radiotimer_vars.period=(PORT_RADIOTIMER_WIDTH)period; timer_reset(TIMER_NUM3); timer_enable(TIMER_NUM3); radiotimer_vars.counter_slot_val=radiotimer_getValue(); //it is 0 always. remove that.. timer_set_compare(TIMER_NUM3, TIMER_COMPARE_REG0, radiotimer_vars.counter_slot_val+period); //the period timer is controlled by the compare 0 register }
uint16_t radio_getTimerValue() { return radiotimer_getValue(); }
PORT_TIMER_WIDTH radio_getTimerValue() { return radiotimer_getValue(); }
// the current value as we do not have a capture register. uint16_t radiotimer_getCapturedTime() { return radiotimer_getValue(); }