]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/eyesIFX/platform_message.h
handle TOSH_DATA_LENGTH more gracefully
[tinyos-2.x.git] / tos / platforms / eyesIFX / platform_message.h
index 2f187dced352210795e6c66a185acef38686741b..3a32c5982f97fc5a7cb4c85624401265f8417f40 100644 (file)
 #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