Made buffer sizes configurable from contiki-conf.h

This commit is contained in:
adamdunkels 2007-03-29 22:22:20 +00:00
parent f35eeb49dd
commit 81b469d4b7
2 changed files with 19 additions and 2 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: queuebuf.c,v 1.5 2007/03/23 10:46:35 adamdunkels Exp $
* $Id: queuebuf.c,v 1.6 2007/03/29 22:22:20 adamdunkels Exp $
*/
/**
@ -42,8 +42,17 @@
#include <string.h> /* for memcpy() */
#ifdef QUEUEBUF_CONF_NUM
#define QUEUEBUF_NUM QUEUEBUF_CONF_NUM
#else
#define QUEUEBUF_NUM 2
#endif
#ifdef QUEUEBUF_CONF_REF_NUM
#define QUEUEBUF_REF_NUM QUEUEBUF_CONF_REF_NUM
#else
#define QUEUEBUF_REF_NUM 2
#endif
struct queuebuf {
u16_t len;

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rimebuf.h,v 1.6 2007/03/24 16:42:43 adamdunkels Exp $
* $Id: rimebuf.h,v 1.7 2007/03/29 22:22:20 adamdunkels Exp $
*/
/**
@ -46,12 +46,20 @@
/**
* \brief The size of the rimebuf, in bytes
*/
#ifdef RIMEBUF_CONF_SIZE
#define RIMEBUF_SIZE RIMEBUF_CONF_SIZE
#else
#define RIMEBUF_SIZE 128
#endif
/**
* \brief The size of the rimebuf header, in bytes
*/
#ifdef RIMEBUF_CONF_HDR_SIZE
#define RIMEBUF_HDR_SIZE RIMEBUF_CONF_HDR_SIZE
#else
#define RIMEBUF_HDR_SIZE 32
#endif
/**
* \brief Clear and reset the rimebuf