diff options
author | Gaëtan Harter | 2016-12-09 13:09:05 +0000 |
---|---|---|
committer | Olaf Bergmann | 2017-02-27 17:05:10 +0000 |
commit | aa55f1b106c0aedfdc8564795b876ecc25e6f989 (patch) | |
tree | 414fee221386d7247844696a7898678945f6c9c9 | |
parent | d1ea35bfb7d3f7e6451029549e6875c51b735006 (diff) | |
download | org.eclipse.tinydtls-aa55f1b106c0aedfdc8564795b876ecc25e6f989.tar.gz org.eclipse.tinydtls-aa55f1b106c0aedfdc8564795b876ecc25e6f989.tar.xz org.eclipse.tinydtls-aa55f1b106c0aedfdc8564795b876ecc25e6f989.zip |
contiki: define BYTE_ORDER according to UIP_BYTE_ORDER
Also mimic UIP values for LITTLE_ENDIAN and BIG_ENDIAN.
Signed-off-by: Gaëtan Harter <gaetan.harter@inria.fr>
Change-Id: Ideec80ea365e046eeca5235707653ece6e4775fd
-rw-r--r-- | Makefile.tinydtls | 14 | ||||
-rw-r--r-- | platform-specific/config-cc2538dk.h | 1 | ||||
-rw-r--r-- | platform-specific/config-econotag.h | 1 | ||||
-rw-r--r-- | platform-specific/config-sky.h | 1 | ||||
-rw-r--r-- | platform-specific/platform.h | 11 |
5 files changed, 12 insertions, 16 deletions
diff --git a/Makefile.tinydtls b/Makefile.tinydtls index 0f303f4..0f6feb5 100644 --- a/Makefile.tinydtls +++ b/Makefile.tinydtls @@ -1,18 +1,6 @@ # This is a -*- Makefile -*- -ifeq ($(TARGET), redbee-econotag) -CFLAGS += -DLITTLE_ENDIAN=3412 -DBYTE_ORDER=LITTLE_ENDIAN -endif - -ifeq ($(TARGET), wismote) -CFLAGS += -DLITTLE_ENDIAN=3412 -DBYTE_ORDER=LITTLE_ENDIAN -endif - -ifeq ($(TARGET), exp5438) -CFLAGS += -DLITTLE_ENDIAN=3412 -DBYTE_ORDER=LITTLE_ENDIAN -endif - -CFLAGS += -DDTLSv12 -DWITH_SHA256 +CFLAGS += -DDTLSv12 -DWITH_SHA256 tinydtls_src = dtls.c crypto.c hmac.c rijndael.c sha2.c ccm.c netq.c ecc.c dtls_time.c peer.c session.c # This activates debugging support diff --git a/platform-specific/config-cc2538dk.h b/platform-specific/config-cc2538dk.h index 38bc85e..547a1b6 100644 --- a/platform-specific/config-cc2538dk.h +++ b/platform-specific/config-cc2538dk.h @@ -1,2 +1 @@ -#define BYTE_ORDER 1234 #define HAVE_ASSERT_H 1 diff --git a/platform-specific/config-econotag.h b/platform-specific/config-econotag.h index 38bc85e..547a1b6 100644 --- a/platform-specific/config-econotag.h +++ b/platform-specific/config-econotag.h @@ -1,2 +1 @@ -#define BYTE_ORDER 1234 #define HAVE_ASSERT_H 1 diff --git a/platform-specific/config-sky.h b/platform-specific/config-sky.h index f49ff3b..7f34972 100644 --- a/platform-specific/config-sky.h +++ b/platform-specific/config-sky.h @@ -1,3 +1,2 @@ -#define BYTE_ORDER 1234 #define HAVE_ASSERT_H 1 typedef int ssize_t; diff --git a/platform-specific/platform.h b/platform-specific/platform.h index 5bc42a4..dfc8b3e 100644 --- a/platform-specific/platform.h +++ b/platform-specific/platform.h @@ -61,6 +61,17 @@ /** do not use uthash hash tables */ #define DTLS_PEERS_NOHASH 1 +/* BYTE_ORDER definition for sha2 */ +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN UIP_LITTLE_ENDIAN +#endif +#ifndef BIG_ENDIAN +#define BIG_ENDIAN UIP_BIG_ENDIAN +#endif +#ifndef UIP_BYTE_ORDER +#define BYTE_ORDER UIP_BYTE_ORDER +#endif + #ifndef SHA2_USE_INTTYPES_H #define SHA2_USE_INTTYPES_H 1 #endif |