]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/printf/printf.h
nativ tos PrintF support, demosensors based on accelerometer, better low power
[tinyos-2.x.git] / tos / lib / printf / printf.h
index e25b28e4ec6b5129c9ec7a7237ba4b25a9e66357..605162c91dc62ebd26a29a8fa1b78a5ae4a407e3 100644 (file)
 #ifndef PRINTF_H
 #define PRINTF_H
 
-#include <stdio.h>
-#include "message.h"
+#ifndef PRINTF_BUFFER_SIZE
+#define PRINTF_BUFFER_SIZE 250 
+#endif
+
+#if PRINTF_BUFFER_SIZE > 255
+  #define PrintfQueueC BigQueueC
+  #define PrintfQueue  BigQueue
+#else
+  #define PrintfQueueC QueueC
+  #define PrintfQueue  Queue
+#endif
 
-#define PRINTF_BUFFER_SIZE 250
+#ifdef _H_msp430hardware_h
+  #include <stdio.h>
+#endif
+#ifdef _H_atmega128hardware_H
+  #include "avr_stdio.h"
+#endif
+#include "message.h"
+int printfflush();
 
+#ifndef PRINTF_MSG_LENGTH
+#define PRINTF_MSG_LENGTH      28
+#endif
 typedef nx_struct printf_msg {
-  nx_uint8_t buffer[TOSH_DATA_LENGTH];
+  nx_uint8_t buffer[PRINTF_MSG_LENGTH];
 } printf_msg_t;
 
 enum {