Added #error to printf for examples that require Arduino

This commit is contained in:
maniacbug
2011-12-18 10:56:12 -08:00
parent 19fa3954c0
commit 26ea4583cd
10 changed files with 243 additions and 191 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (C) 2011 James Coliz, Jr. <maniacbug@ymail.com>
Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +16,8 @@
#ifndef __PRINTF_H__
#define __PRINTF_H__
#ifdef ARDUINO
int serial_putc( char c, FILE * )
{
Serial.write( c );
@@ -28,4 +30,8 @@ void printf_begin(void)
fdevopen( &serial_putc, 0 );
}
#else
#error This example is only for use on Arduino.
#endif // ARDUINO
#endif // __PRINTF_H__