mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Avoid softserial loopback on port 2 on Olimexino boards.
This commit is contained in:
parent
aef3c6ad97
commit
eed511f90a
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue