Skip to content
Snippets Groups Projects
Commit 2e1d846a authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Optionally disable stdout

parent 3c23cef5
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,10 @@ ifeq (${softi2c_pullup}, 1) ...@@ -56,6 +56,10 @@ ifeq (${softi2c_pullup}, 1)
COMMON_FLAGS += -DSOFTI2C_PULLUP COMMON_FLAGS += -DSOFTI2C_PULLUP
endif endif
ifeq (${kout_nop}, 1)
COMMON_FLAGS += -DKOUT_NOP
endif
ifeq (${timer_cycles}, 1) ifeq (${timer_cycles}, 1)
COMMON_FLAGS += -DTIMER_CYCLES COMMON_FLAGS += -DTIMER_CYCLES
endif endif
......
...@@ -4,12 +4,15 @@ ...@@ -4,12 +4,15 @@
void StandardOutput::setup() void StandardOutput::setup()
{ {
#ifndef KOUT_NOP
PORTC |= _BV(PC1); PORTC |= _BV(PC1);
DDRC |= _BV(DDC1); DDRC |= _BV(DDC1);
#endif
} }
void StandardOutput::put(char c) void StandardOutput::put(char c)
{ {
#ifndef KOUT_NOP
unsigned char i = 1; unsigned char i = 1;
PORTC &= ~_BV(PC1); PORTC &= ~_BV(PC1);
__builtin_avr_delay_cycles(59); __builtin_avr_delay_cycles(59);
...@@ -30,6 +33,7 @@ void StandardOutput::put(char c) ...@@ -30,6 +33,7 @@ void StandardOutput::put(char c)
if (c == '\n') { if (c == '\n') {
put('\r'); put('\r');
} }
#endif
} }
StandardOutput kout; StandardOutput kout;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment