summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-08-09 12:55:48 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-08-09 12:55:48 +0200
commit2e1d846a31bc9f45851b46ac70fa75be685a5041 (patch)
tree8652e1e9ed15643e0ecd2119b6941744709b1050
parent3c23cef5dfa311b3d9a967a889d303f57872715d (diff)
Optionally disable stdout
-rw-r--r--Makefile4
-rw-r--r--src/arch/blinkenrocket/driver/stdout.cc4
2 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5d8b2ad..0771c1c 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,10 @@ ifeq (${softi2c_pullup}, 1)
COMMON_FLAGS += -DSOFTI2C_PULLUP
endif
+ifeq (${kout_nop}, 1)
+ COMMON_FLAGS += -DKOUT_NOP
+endif
+
ifeq (${timer_cycles}, 1)
COMMON_FLAGS += -DTIMER_CYCLES
endif
diff --git a/src/arch/blinkenrocket/driver/stdout.cc b/src/arch/blinkenrocket/driver/stdout.cc
index 961cf46..195ba96 100644
--- a/src/arch/blinkenrocket/driver/stdout.cc
+++ b/src/arch/blinkenrocket/driver/stdout.cc
@@ -4,12 +4,15 @@
void StandardOutput::setup()
{
+#ifndef KOUT_NOP
PORTC |= _BV(PC1);
DDRC |= _BV(DDC1);
+#endif
}
void StandardOutput::put(char c)
{
+#ifndef KOUT_NOP
unsigned char i = 1;
PORTC &= ~_BV(PC1);
__builtin_avr_delay_cycles(59);
@@ -30,6 +33,7 @@ void StandardOutput::put(char c)
if (c == '\n') {
put('\r');
}
+#endif
}
StandardOutput kout;