From fdb60ab22f75aaac7a4fa683dcafa022d70ba4c6 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 8 Dec 2017 16:43:35 +0000 Subject: [PATCH] Move non-configuration macros to msp430def.h --- arch/cpu/msp430/msp430def.h | 13 +++++++++++++ arch/platform/sky/contiki-conf.h | 3 --- arch/platform/sky/platform-conf.h | 17 ----------------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/arch/cpu/msp430/msp430def.h b/arch/cpu/msp430/msp430def.h index 05e9b0bbc..d574697a9 100644 --- a/arch/cpu/msp430/msp430def.h +++ b/arch/cpu/msp430/msp430def.h @@ -85,14 +85,22 @@ typedef int32_t s32_t; #else #define DCOSYNCH_PERIOD 30 #endif +/* Types for clocks and uip_stats */ +typedef unsigned short uip_stats_t; +typedef unsigned long clock_time_t; +typedef long off_t; void msp430_cpu_init(void); /* Rename to cpu_init() later! */ void msp430_sync_dco(void); +/* Our clock resolution, this is the same as Unix HZ. */ +#define CLOCK_CONF_SECOND 128UL #define cpu_init() msp430_cpu_init() void *sbrk(int); +#define CCIF +#define CLIF typedef int spl_t; /* void splx_(spl_t); */ @@ -133,6 +141,11 @@ void *w_memset(void *out, int value, size_t n); #define MSP430_REQUIRE_LPM2 2 #define MSP430_REQUIRE_LPM3 3 +/* Platform-specific checksum implementation */ +#define UIP_ARCH_IPCHKSUM 1 + +#define BAUD2UBR(baud) ((F_CPU/baud)) + void msp430_add_lpm_req(int req); void msp430_remove_lpm_req(int req); diff --git a/arch/platform/sky/contiki-conf.h b/arch/platform/sky/contiki-conf.h index 52fc596a8..4b647e8b0 100644 --- a/arch/platform/sky/contiki-conf.h +++ b/arch/platform/sky/contiki-conf.h @@ -30,9 +30,6 @@ #define UIP_CONF_BUFFER_SIZE 240 #endif -/* Platform-specific checksum implementation */ -#define UIP_ARCH_IPCHKSUM 1 - /* Platform-specific (H/W) AES implementation */ #ifndef AES_128_CONF #define AES_128_CONF cc2420_aes_128_driver diff --git a/arch/platform/sky/platform-conf.h b/arch/platform/sky/platform-conf.h index c2267abda..93edd1d67 100644 --- a/arch/platform/sky/platform-conf.h +++ b/arch/platform/sky/platform-conf.h @@ -67,23 +67,6 @@ /* CPU target speed in Hz */ #define F_CPU 3900000uL /*2457600uL*/ -/* Our clock resolution, this is the same as Unix HZ. */ -#define CLOCK_CONF_SECOND 128UL - -#define BAUD2UBR(baud) ((F_CPU/baud)) - -#define CCIF -#define CLIF - -#define HAVE_STDINT_H -#include "msp430def.h" - - -/* Types for clocks and uip_stats */ -typedef unsigned short uip_stats_t; -typedef unsigned long clock_time_t; -typedef long off_t; - /* the low-level radio driver */ #define NETSTACK_CONF_RADIO cc2420_driver