コード例 #1
0
ファイル: radiotimer.c プロジェクト: Babody/openwsn-fw
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
ファイル: radio.c プロジェクト: giu7ppe/openwsn
uint16_t radio_getTimerValue() {
   return radiotimer_getValue();
}
コード例 #3
0
ファイル: radio.c プロジェクト: anemolif/openwsn-fw
PORT_TIMER_WIDTH radio_getTimerValue() {
   return radiotimer_getValue();
}
コード例 #4
0
ファイル: abstimer.c プロジェクト: fsaintma/openwsn-fw
// the current value as we do not have a capture register.
uint16_t radiotimer_getCapturedTime() {
    return radiotimer_getValue();
}