sicslowpan: set SICSLOWPAN_COMPRESSION from .h file rather than .c, for integration with viewconf

This commit is contained in:
Simon Duquennoy 2017-10-11 17:23:36 +02:00
parent c4f89ee44d
commit 9d77bad2c2
2 changed files with 5 additions and 8 deletions

View File

@ -64,6 +64,7 @@
#include "contiki.h"
#include "dev/watchdog.h"
#include "net/link-stats.h"
#include "net/ipv6/uipopt.h"
#include "net/ipv6/tcpip.h"
#include "net/ipv6/uip.h"
#include "net/ipv6/uip-ds6.h"
@ -84,12 +85,6 @@
#define LOG_MODULE "6LoWPAN"
#define LOG_LEVEL LOG_LEVEL_6LOWPAN
#ifdef SICSLOWPAN_CONF_COMPRESSION
#define SICSLOWPAN_COMPRESSION SICSLOWPAN_CONF_COMPRESSION
#else /* SICSLOWPAN_CONF_COMPRESSION */
#define SICSLOWPAN_COMPRESSION SICSLOWPAN_COMPRESSION_IPHC
#endif /* SICSLOWPAN_CONF_COMPRESSION */
#define GET16(ptr,index) (((uint16_t)((ptr)[index] << 8)) | ((ptr)[(index) + 1]))
#define SET16(ptr,index,value) do { \
(ptr)[index] = ((value) >> 8) & 0xff; \

View File

@ -540,8 +540,10 @@ void uip_log(char *msg);
* Do we compress the IP header or not
*/
#ifndef SICSLOWPAN_CONF_COMPRESSION
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
#endif
#define SICSLOWPAN_COMPRESSION SICSLOWPAN_COMPRESSION_IPHC
#else
#define SICSLOWPAN_COMPRESSION SICSLOWPAN_CONF_COMPRESSION
#endif /* SICSLOWPAN_CONF_COMPRESSION */
/**
* If we use IPHC compression, how many address contexts do we support