32 #include "contiki-net.h"
35 #include "isr_compat.h"
37 #ifndef CONF_SFD_TIMESTAMPS
38 #define CONF_SFD_TIMESTAMPS 0
41 #ifdef CONF_SFD_TIMESTAMPS
42 #include "cc2420-arch-sfd.h"
48 ISR(CC2420_IRQ, cc24240_port1_interrupt)
50 ENERGEST_ON(ENERGEST_TYPE_IRQ);
51 if(cc2420_interrupt()) {
54 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
59 cc2420_arch_init(
void)
64 CC2420_CSN_PORT(DIR) |= BV(CC2420_CSN_PIN);
65 CC2420_VREG_PORT(DIR) |= BV(CC2420_VREG_PIN);
66 CC2420_RESET_PORT(DIR) |= BV(CC2420_RESET_PIN);
68 #if CONF_SFD_TIMESTAMPS
69 cc2420_arch_sfd_init();
void spi_init(void)
Initialize the SPI bus.