Ported it to c without arduino dependencies. Switched from printf to a
[RF24-C.git] / examples / scanner / printf.h
blob66f64384f4a4b5e3e44fe55e7055195c2293e928
1 /*
2 Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 version 2 as published by the Free Software Foundation.
7 */
9 /**
10 * @file printf.h
12 * Setup necessary to direct stdout to the Arduino Serial library, which
13 * enables 'printf'
16 #ifndef __PRINTF_H__
17 #define __PRINTF_H__
19 int serial_putc( char c, FILE * )
21 Serial.write( c );
23 return c;
26 void printf_begin(void)
28 fdevopen( &serial_putc, 0 );
31 #endif // __PRINTF_H__