Refactor pingpair_test to remove all serial io from within the irq handler, as necessitated by Arduino 1.0

This commit is contained in:
maniacbug
2012-01-15 22:15:45 -08:00
parent dec61af85f
commit dc48235343
5 changed files with 208 additions and 165 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,7 +16,7 @@
#ifndef __PRINTF_H__
#define __PRINTF_H__
#include "WProgram.h"
#ifdef ARDUINO
int serial_putc( char c, FILE * )
{
@@ -30,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__