Contiki 2.6
|
00001 #ifndef __CONTIKI_CONF_H__ 00002 #define __CONTIKI_CONF_H__ 00003 00004 #include<stdint.h> 00005 00006 /* Platform name, type, and MCU clock rate */ 00007 #define PLATFORM_NAME "STK500" 00008 #define PLATFORM_TYPE STK500 00009 #ifndef F_CPU 00010 #define F_CPU 8000000UL 00011 #endif 00012 00013 #define CCIF 00014 #define CLIF 00015 00016 /* The AVR tick interrupt usually is done with an 8 bit counter around 128 Hz. 00017 * 125 Hz needs slightly more overhead during the interrupt, as does a 32 bit 00018 * clock_time_t. 00019 */ 00020 /* Clock ticks per second */ 00021 #define CLOCK_CONF_SECOND 125 00022 #if 1 00023 /* 16 bit counter overflows every ~10 minutes */ 00024 typedef unsigned short clock_time_t; 00025 #define CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0) 00026 #define INFINITE_TIME 0xffff 00027 #define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */ 00028 #define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME INFINITE_TIME/CLOCK_CONF_SECOND /* Default uses 600 */ 00029 #else 00030 typedef unsigned long clock_time_t; 00031 #define CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0) 00032 #define INFINITE_TIME 0xffffffff 00033 #endif 00034 /* These routines are not part of the contiki core but can be enabled in cpu/avr/clock.c */ 00035 void clock_delay_msec(uint16_t howlong); 00036 void clock_adjust_ticks(clock_time_t howmany); 00037 00038 #define SLIP_PORT 0 00039 00040 #if UIP_CONF_IPV6 00041 #define RIMEADDR_CONF_SIZE 8 00042 #define UIP_CONF_ICMP6 1 00043 #define UIP_CONF_UDP 1 00044 #define UIP_CONF_TCP 1 00045 //#define UIP_CONF_IPV6_RPL 0 00046 00047 /* See uip-ds6.h */ 00048 #define UIP_CONF_DS6_NBR_NBU 20 00049 #define UIP_CONF_DS6_DEFRT_NBU 2 00050 #define UIP_CONF_DS6_PREFIX_NBU 3 00051 #define UIP_CONF_DS6_ROUTE_NBU 20 00052 #define UIP_CONF_DS6_ADDR_NBU 3 00053 #define UIP_CONF_DS6_MADDR_NBU 0 00054 #define UIP_CONF_DS6_AADDR_NBU 0 00055 00056 #define NETSTACK_CONF_NETWORK sicslowpan_driver 00057 #define NETSTACK_CONF_MAC nullmac_driver 00058 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06 00059 #define NETSTACK_CONF_RDC sicslowmac_driver 00060 #define NETSTACK_CONF_FRAMER framer_802154 00061 #define NETSTACK_CONF_RADIO rf230_driver 00062 #define CHANNEL_802_15_4 26 00063 /* AUTOACK receive mode gives better rssi measurements, even if ACK is never requested */ 00064 #define RF230_CONF_AUTOACK 1 00065 /* Request 802.15.4 ACK on all packets sent (else autoretry). This is primarily for testing. */ 00066 #define SICSLOWPAN_CONF_ACK_ALL 0 00067 /* Number of auto retry attempts 0-15 (0 implies don't use extended TX_ARET_ON mode with CCA) */ 00068 #define RF230_CONF_AUTORETRIES 2 00069 #define SICSLOWPAN_CONF_FRAG 1 00070 /* Most browsers reissue GETs after 3 seconds which stops fragment reassembly so a longer MAXAGE does no good */ 00071 #define SICSLOWPAN_CONF_MAXAGE 3 00072 /* How long to wait before terminating an idle TCP connection. Smaller to allow faster sleep. Default is 120 seconds */ 00073 #define UIP_CONF_WAIT_TIMEOUT 5 00074 00075 #else 00076 /* ip4 should build but is largely untested */ 00077 #define RIMEADDR_CONF_SIZE 2 00078 #define NETSTACK_CONF_NETWORK rime_driver 00079 #endif /* UIP_CONF_IPV6 */ 00080 00081 typedef unsigned short uip_stats_t; 00082 00083 /* These names are deprecated, use C99 names. */ 00084 typedef uint8_t u8_t; 00085 typedef int8_t s8_t; 00086 typedef uint16_t u16_t; 00087 typedef int16_t s16_t; 00088 typedef uint32_t u32_t; 00089 typedef int32_t s32_t; 00090 00091 #endif /* __CONTIKI_CONF_H__ */