summaryrefslogtreecommitdiff
path: root/src/arch/arduino-nano
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arduino-nano')
-rw-r--r--src/arch/arduino-nano/driver/stdout.cc11
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)));