7 #include <avr/interrupt.h>
17 #define AODV_COMPLIANCE
18 #define AODV_NUM_RT_ENTRIES 32
22 void clock_set_seconds(
unsigned long s);
23 unsigned long clock_seconds(
void);
28 #define PROCESS_CONF_FASTPOLL 4
32 #define CLOCK_CONF_SECOND 62
35 #define F_CPU 8000000L
38 #define BAUD2UBR(baud) ((u16_t)((F_CPU/baud/8uL + 1)/2 - 1))
46 #define UIP_CONF_DHCP_LIGHT
47 #define UIP_CONF_LLH_LEN 0
48 #define UIP_CONF_BUFFER_SIZE 116
49 #define UIP_CONF_RECEIVE_WINDOW (UIP_CONF_BUFFER_SIZE - 40)
50 #define UIP_CONF_MAX_CONNECTIONS 4
51 #define UIP_CONF_MAX_LISTENPORTS 8
52 #define UIP_CONF_UDP_CONNS 12
53 #define UIP_CONF_FWCACHE_SIZE 30
54 #define UIP_CONF_BROADCAST 1
56 #define UIP_CONF_UDP_CHECKSUMS 1
57 #define UIP_CONF_PINGADDRCONF 0
58 #define UIP_CONF_LOGGING 0
67 #define LEDS_CONF_GREEN _BV(2)
68 #define LEDS_CONF_YELLOW _BV(3)
72 #define LEDS_CONF_ORANGE _BV(4)
73 #define LEDS_CONF_GREEN _BV(7)
75 #define LEDS_CONF_RED _BV(3)
76 #define LEDS_CONF_YELLOW _BV(4)
80 typedef u16_t clock_time_t;
83 #define ROM_ERASE_UNIT_SIZE SPM_PAGESIZE
84 #define XMEM_ERASE_UNIT_SIZE 8
87 #define EEPROMFS_ADDR_CODEPROP (128 * XMEM_ERASE_UNIT_SIZE)
91 #define CC2420_CONF_SYMBOL_LOOP_COUNT 500
97 #define SPI_TXBUF SPDR
98 #define SPI_RXBUF SPDR
100 #define BV(bitno) _BV(bitno)
102 #define SPI_WAITFOREOTx() do { while (!(SPSR & BV(SPIF))); } while (0)
103 #define SPI_WAITFOREORx() do { while (!(SPSR & BV(SPIF))); } while (0)
124 #define FIFO_IS_1 (!!(PIND & BV(FIFO)))
125 #define CCA_IS_1 (!!(PIND & BV(CCA) ))
126 #define RESET_IS_1 (!!(PINB & BV(RESET_N)))
127 #define VREG_IS_1 (!!(PINB & BV(VREG_EN)))
128 #define FIFOP_IS_1 (!!(PIND & BV(FIFO_P)))
129 #define SFD_IS_1 (!!(PIND & BV(SFD)))
132 #define SET_RESET_INACTIVE() ( PORTB |= BV(RESET_N) )
133 #define SET_RESET_ACTIVE() ( PORTB &= ~BV(RESET_N) )
136 #define SET_VREG_ACTIVE() ( PORTB |= BV(VREG_EN) )
137 #define SET_VREG_INACTIVE() ( PORTB &= ~BV(VREG_EN) )
140 #define FIFOP_INT_INIT() do {\
146 #define ENABLE_FIFOP_INT() do { EIMSK |= 0x01; } while (0)
147 #define DISABLE_FIFOP_INT() do { EIMSK &= ~0x01; } while (0)
148 #define CLEAR_FIFOP_INT() do { EIFR = 0x01; } while (0)
159 #define SPI_ENABLE() ( PORTB &= ~BV(CSN) )
160 #define SPI_DISABLE() ( PORTB |= BV(CSN) )