From 738579ccc0bce339be74aad761c7286258433e93 Mon Sep 17 00:00:00 2001 From: klueska Date: Mon, 15 Feb 2010 03:16:14 +0000 Subject: [PATCH] Changed the default to be that all platforms #include stdio.h unless specifically set to include something else, and added support for imote2, hopefully... --- tos/lib/printf/PrintfP.nc | 4 ++-- tos/lib/printf/printf.h | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tos/lib/printf/PrintfP.nc b/tos/lib/printf/PrintfP.nc index 0095e501..e59c0a73 100644 --- a/tos/lib/printf/PrintfP.nc +++ b/tos/lib/printf/PrintfP.nc @@ -161,9 +161,9 @@ implementation { else post retrySend(); } -#ifdef _H_msp430hardware_h +//#ifdef _H_msp430hardware_h int putchar(int c) __attribute__((noinline)) @C() @spontaneous() { -#endif +//#endif #ifdef _H_atmega128hardware_H int uart_putchar(char c, FILE *stream) __attribute__((noinline)) @C() @spontaneous() { #endif diff --git a/tos/lib/printf/printf.h b/tos/lib/printf/printf.h index c70a791f..48dc1abc 100644 --- a/tos/lib/printf/printf.h +++ b/tos/lib/printf/printf.h @@ -42,14 +42,17 @@ #define PrintfQueue Queue #endif -#ifdef _H_msp430hardware_h - #include -#endif #ifdef _H_atmega128hardware_H #include "avr_stdio.h" -#endif +#else #ifdef __M16C62PHARDWARE_H__ -#include "m16c62p_printf.h" + #include "m16c62p_printf.h" +#else + #include +#endif +#endif +#ifdef PXA27X_HARDWARE_H + #undef putchar #endif #include "message.h" int printfflush(); -- 2.39.2