remote power switch example updated to use coap version 13

This commit is contained in:
Giovanni evilaliv3 Pellerano 2013-05-17 14:45:13 +02:00
parent db729eddd2
commit 49d861979b
2 changed files with 23 additions and 7 deletions

View file

@ -1,3 +1,7 @@
ifndef TARGET
TARGET=seedeye
endif
all: remotepowerswitch all: remotepowerswitch
CONTIKI=../../../ CONTIKI=../../../
@ -8,31 +12,41 @@ WITH_UIP6=1
# for some platforms # for some platforms
UIP_CONF_IPV6=1 UIP_CONF_IPV6=1
# variable for this Makefile WITH_COAP=13
# configure CoAP implementation (3|7) (er-coap-07 also supports CoAP draft 08)
WITH_COAP=7
UIP_CONF_RPL=1 UIP_CONF_RPL=1
# REST framework, requires WITH_COAP # REST framework, requires WITH_COAP
ifeq ($(WITH_COAP), 7) ifeq ($(WITH_COAP), 13)
${info INFO: compiling with CoAP-13}
CFLAGS += -DWITH_COAP=13
CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0
APPS += er-coap-13
else ifeq ($(WITH_COAP), 12)
${info INFO: compiling with CoAP-12}
CFLAGS += -DWITH_COAP=12
CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0
APPS += er-coap-12
else ifeq ($(WITH_COAP), 7)
${info INFO: compiling with CoAP-08} ${info INFO: compiling with CoAP-08}
CFLAGS += -DWITH_COAP=7 CFLAGS += -DWITH_COAP=7
CFLAGS += -DREST=coap_rest_implementation CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0 CFLAGS += -DUIP_CONF_TCP=0
APPS += er-coap-07 APPS += er-coap-07
else ifeq ($(WITH_COAP), 3) else ifeq ($(WITH_COAP), 3)
${info INFO: compiling with CoAP-03} ${info INFO: compiling with CoAP-03}
CFLAGS += -DWITH_COAP=3 CFLAGS += -DWITH_COAP=3
CFLAGS += -DREST=coap_rest_implementation CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0 CFLAGS += -DUIP_CONF_TCP=0
APPS += er-coap-03 APPS += er-coap-03
else else
${info INFO: compiling with HTTP} ${info INFO: compiling with HTTP}
CFLAGS += -DWITH_HTTP CFLAGS += -DWITH_HTTP
CFLAGS += -DREST=http_rest_implementation CFLAGS += -DREST=http_rest_implementation
CFLAGS += -DUIP_CONF_TCP=1 CFLAGS += -DUIP_CONF_TCP=1
APPS += er-http-engine APPS += er-http-engine
endif endif
APPS += erbium APPS += erbium

View file

@ -104,6 +104,8 @@ typedef uint32_t rtimer_clock_t;
#define UIP_CONF_ND6_RETRANS_TIMER 10000 #define UIP_CONF_ND6_RETRANS_TIMER 10000
#define UIP_CONF_BUFFER_SIZE 240
#ifndef QUEUEBUF_CONF_NUM #ifndef QUEUEBUF_CONF_NUM
#define QUEUEBUF_CONF_NUM 16 #define QUEUEBUF_CONF_NUM 16
#endif /* QUEUEBUF_CONF_NUM */ #endif /* QUEUEBUF_CONF_NUM */