mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Ability to see how many Tx bytes are free in serial port buffer
This commit is contained in:
parent
d0b940bf75
commit
6e504ca52a
13 changed files with 90 additions and 22 deletions
|
@ -514,7 +514,7 @@ void init(void)
|
|||
void processLoopback(void) {
|
||||
if (loopbackPort) {
|
||||
uint8_t bytesWaiting;
|
||||
while ((bytesWaiting = serialTotalBytesWaiting(loopbackPort))) {
|
||||
while ((bytesWaiting = serialRxBytesWaiting(loopbackPort))) {
|
||||
uint8_t b = serialRead(loopbackPort);
|
||||
serialWrite(loopbackPort, b);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue