33 #include "contiki-net.h"
38 #include "isr_compat.h"
40 #ifndef CONF_SFD_TIMESTAMPS
41 #define CONF_SFD_TIMESTAMPS 0
44 #ifdef CONF_SFD_TIMESTAMPS
45 #include "cc2420-arch-sfd.h"
49 ISR(CC2420_IRQ, cc24240_fifop_interrupt)
51 ENERGEST_ON(ENERGEST_TYPE_IRQ);
54 if(P1IV == (2 * (1 + CC2420_FIFOP_PIN))) {
55 if(cc2420_interrupt()) {
59 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
64 cc2420_arch_init(
void)
69 CC2420_CSN_PORT(DIR) |= BV(CC2420_CSN_PIN);
70 CC2420_VREG_PORT(DIR) |= BV(CC2420_VREG_PIN);
71 CC2420_RESET_PORT(DIR) |= BV(CC2420_RESET_PIN);
73 #if CONF_SFD_TIMESTAMPS
74 cc2420_arch_sfd_init();
void spi_init(void)
Initialize the SPI bus.