fixed debugging in transceiver (stack size was too small)

This commit is contained in:
Oleg Hahm 2013-08-08 23:43:15 +02:00
parent fe3e06bfce
commit 0815de942a
2 changed files with 30 additions and 21 deletions

View File

@ -5,17 +5,33 @@
/* Stack size for transceiver thread */ /* Stack size for transceiver thread */
#ifndef TRANSCEIVER_STACK_SIZE #ifndef TRANSCEIVER_STACK_SIZE
#if ENABLE_DEBUG
#define TRANSCEIVER_STACK_SIZE (KERNEL_CONF_STACKSIZE_PRINTF)
#else
#define TRANSCEIVER_STACK_SIZE (512) #define TRANSCEIVER_STACK_SIZE (512)
#endif #endif
#endif
#define PAYLOAD_SIZE (0)
#ifdef MODULE_CC110X
#if (CC1100_MAX_DATA_LENGTH > PAYLOAD_SIZE)
#undef PAYLOAD_SIZE
#define PAYLOAD_SIZE (CC1100_MAX_DATA_LENGTH)
#endif
#endif
#ifdef MODULE_CC110X_NG
#if (CC1100_MAX_DATA_LENGTH > PAYLOAD_SIZE)
#undef PAYLOAD_SIZE
#define PAYLOAD_SIZE (CC1100_MAX_DATA_LENGTH)
#endif
#endif
#ifdef MODULE_CC2420 #ifdef MODULE_CC2420
#define PAYLOAD_SIZE (118) #if (CC2420_MAX_DATA_LENGTH > PAYLOAD_SIZE)
#else #undef PAYLOAD_SIZE
#define PAYLOAD_SIZE (58) #define PAYLOAD_SIZE (CC2420_MAX_DATA_LENGTH)
#endif
#endif
#ifdef MODULE_MC1322X
#if (MC1322X_MAX_DATA_LENGTH > PAYLOAD_SIZE)
#undef PAYLOAD_SIZE
#define PAYLOAD_SIZE (MC1322X_MAX_DATA_LENGTH)
#endif
#endif #endif
/* The maximum of threads to register */ /* The maximum of threads to register */
#define TRANSCEIVER_MAX_REGISTERED (4) #define TRANSCEIVER_MAX_REGISTERED (4)

View File

@ -24,32 +24,21 @@
#include <thread.h> #include <thread.h>
#include <msg.h> #include <msg.h>
#include <transceiver.h>
#include <radio/types.h> #include <radio/types.h>
#include "transceiver.h"
/* supported transceivers */ /* supported transceivers */
#ifdef MODULE_CC110X #ifdef MODULE_CC110X
#include <cc1100-interface.h> #include <cc1100-interface.h>
#if (CC1100_MAX_DATA_LENGTH > PAYLOAD_SIZE)
#undef PAYLOAD_SIZE
#define PAYLOAD_SIZE (CC1100_MAX_DATA_LENGTH)
#endif
#endif #endif
#ifdef MODULE_CC110X_NG #ifdef MODULE_CC110X_NG
#include <cc110x_ng.h> #include <cc110x_ng.h>
#if (CC1100_MAX_DATA_LENGTH > PAYLOAD_SIZE)
#undef PAYLOAD_SIZE
#define PAYLOAD_SIZE (CC1100_MAX_DATA_LENGTH)
#endif
#endif #endif
#ifdef MODULE_CC2420 #ifdef MODULE_CC2420
#include <cc2420.h> #include <cc2420.h>
#if (CC2420_MAX_DATA_LENGTH > PAYLOAD_SIZE)
#undef PAYLOAD_SIZE
#define PAYLOAD_SIZE (CC2420_MAX_DATA_LENGTH)
#endif
#endif #endif
#ifdef MODULE_MC1322X #ifdef MODULE_MC1322X
@ -59,6 +48,10 @@
#endif #endif
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
#if ENABLE_DEBUG
#undef TRANSCEIVER_STACK_SIZE
#define TRANSCEIVER_STACK_SIZE (KERNEL_CONF_STACKSIZE_PRINTF)
#endif
#include <debug.h> #include <debug.h>
/*------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------*/