32 #include "contiki-net.h"
36 #include "isr_compat.h"
38 #ifdef CC2420_CONF_SFD_TIMESTAMPS
39 #define CONF_SFD_TIMESTAMPS CC2420_CONF_SFD_TIMESTAMPS
42 #ifndef CONF_SFD_TIMESTAMPS
43 #define CONF_SFD_TIMESTAMPS 0
46 #ifdef CONF_SFD_TIMESTAMPS
47 #include "cc2420-arch-sfd.h"
51 ISR(CC2420_IRQ, cc2420_port1_interrupt)
53 ENERGEST_ON(ENERGEST_TYPE_IRQ);
55 if(cc2420_interrupt()) {
59 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
63 cc2420_arch_init(
void)
68 CC2420_CSN_PORT(DIR) |= BV(CC2420_CSN_PIN);
69 CC2420_VREG_PORT(DIR) |= BV(CC2420_VREG_PIN);
70 CC2420_RESET_PORT(DIR) |= BV(CC2420_RESET_PIN);
72 #if CONF_SFD_TIMESTAMPS
73 cc2420_arch_sfd_init();
void spi_init(void)
Initialize the SPI bus.