diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arduino-nano/driver/stdout.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/arch/arduino-nano/driver/stdout.cc b/src/arch/arduino-nano/driver/stdout.cc index f6c39b3..cddd499 100644 --- a/src/arch/arduino-nano/driver/stdout.cc +++ b/src/arch/arduino-nano/driver/stdout.cc @@ -5,7 +5,6 @@ */ #include "driver/stdout.h" #include <avr/io.h> -#include <avr/interrupt.h> #ifndef BAUD #define BAUD 9600UL @@ -28,6 +27,16 @@ void StandardOutput::setup() UCSR0C = _BV(UCSZ01) | _BV(UCSZ00); } +OutputStream & StandardOutput::pprint(const char *text) +{ + PGM_P p = reinterpret_cast<PGM_P>(text); + char c; + while ((c = pgm_read_byte(p++))) { + put(c); + } + return *this; +} + void StandardOutput::put(char c) { while (!(UCSR0A & _BV(UDRE0))); |