From 796bb709d30f07bc4118b1e2cbb656fda2d8bec3 Mon Sep 17 00:00:00 2001 From: andreaskoepke Date: Tue, 12 Jun 2007 11:02:35 +0000 Subject: [PATCH] handle TOSH_DATA_LENGTH more gracefully --- tos/platforms/eyesIFX/platform_message.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tos/platforms/eyesIFX/platform_message.h b/tos/platforms/eyesIFX/platform_message.h index 2f187dce..3a32c598 100644 --- a/tos/platforms/eyesIFX/platform_message.h +++ b/tos/platforms/eyesIFX/platform_message.h @@ -44,11 +44,9 @@ #include "Serial.h" #include "tda5250_message.h" -#ifdef TOSH_DATA_LENGTH -#undef TOSH_DATA_LENGTH -#endif - +#ifndef TOSH_DATA_LENGTH #define TOSH_DATA_LENGTH 48 +#endif typedef union message_header_t { tda5250_header_t radio; @@ -67,4 +65,8 @@ typedef tda5250_header_t message_radio_header_t; typedef tda5250_footer_t message_radio_footer_t; typedef tda5250_metadata_t message_radio_metadata_t; +#if TOSH_DATA_LENGTH < 33 +#error "TOSH_DATA_LENGH must be larger than 33 bytes for this platform." +#endif + #endif -- 2.39.2