34 #include "isr_compat.h"
36 extern volatile uint8_t cc2420_sfd_counter;
37 extern volatile uint16_t cc2420_sfd_start_time;
38 extern volatile uint16_t cc2420_sfd_end_time;
42 ISR(TIMERB1, cc2420_timerb1_interrupt)
45 ENERGEST_ON(ENERGEST_TYPE_IRQ);
50 cc2420_sfd_start_time = TBCCR1;
52 cc2420_sfd_counter = 0;
53 cc2420_sfd_end_time = TBCCR1;
55 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
59 cc2420_arch_sfd_init(
void)
62 CC2420_SFD_PORT(
SEL) = BV(CC2420_SFD_PIN);
65 TBCTL = TBSSEL_1 | TBCLR;
68 TBCCTL1 = CM_3 | CAP | SCS;
#define RTIMER_NOW()
Get the current clock time.