Пример #1
0
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
}
Пример #2
0
uint16_t radio_getTimerValue() {
   return radiotimer_getValue();
}
Пример #3
0
PORT_TIMER_WIDTH radio_getTimerValue() {
   return radiotimer_getValue();
}
Пример #4
0
// the current value as we do not have a capture register.
uint16_t radiotimer_getCapturedTime() {
    return radiotimer_getValue();
}