From 98854f80e0b2fb21fb9454ba5d58759db4696c87 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Mon, 26 Nov 2007 23:30:35 +0000 Subject: [PATCH] Made Rime address size configurable through contiki-conf.h --- core/net/rime/rimeaddr.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/core/net/rime/rimeaddr.h b/core/net/rime/rimeaddr.h index 454e627f8..a5d4cd2b9 100644 --- a/core/net/rime/rimeaddr.h +++ b/core/net/rime/rimeaddr.h @@ -42,7 +42,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rimeaddr.h,v 1.3 2007/03/31 18:31:28 adamdunkels Exp $ + * $Id: rimeaddr.h,v 1.4 2007/11/26 23:30:35 adamdunkels Exp $ */ /** @@ -55,9 +55,17 @@ #ifndef __RIMEADDR_H__ #define __RIMEADDR_H__ +#include "contiki-conf.h" + +#ifdef RIMEADDR_CONF_SIZE +#define RIMEADDR_SIZE RIMEADDR_CONF_SIZE +#else /* RIMEADDR_SIZE */ +#define RIMEADDR_SIZE 2 +#endif /* RIMEADDR_SIZE */ + typedef union { - unsigned char u8[2]; - unsigned short u16[1]; + unsigned char u8[RIMEADDR_SIZE]; + unsigned short u16[RIMEADDR_SIZE / 2]; } rimeaddr_t;