diff --git a/src/main.c b/src/main.c index 24907b2d1..818dba6a2 100755 --- a/src/main.c +++ b/src/main.c @@ -184,14 +184,19 @@ int main(void) //serialWrite(core.mainport, b); }; } + if (loopbackPort2) { while (serialTotalBytesWaiting(loopbackPort2)) { +#ifndef OLIMEXINO // PB0/D27 and PB1/D28 internally connected so this would result in a continuous stream of data + serialRead(loopbackPort2); +#else uint8_t b = serialRead(loopbackPort2); - serialWrite(loopbackPort1, b); + serialWrite(loopbackPort2, b); //serialWrite(core.mainport, 0x02); //serialWrite(core.mainport, b); +#endif // OLIMEXINO }; - } + } #endif } }