Skip to content

Commit 3f7adee

Browse files
committed
Adding comments to flow control calls
1 parent 9809e3e commit 3f7adee

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Firmware/LoRaSerial/LoRaSerial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ void setup()
643643

644644
arch.beginWDT(); //Start watchdog timer
645645

646-
updateRTS(true); //Enable serial input
646+
updateRTS(true); //We're ready for more data
647647

648648
systemPrintTimestamp();
649649
systemPrintln("LRS");

Firmware/LoRaSerial/Serial.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ void serialOutputByte(uint8_t data)
7676
}
7777
}
7878

79-
//Update the output of the RTS pin (host says it's ok to send data when assertRTS = true)
79+
//Update the output of the RTS pin
80+
//LoRaSerial will drive RTS low when it is ready for data
81+
//Given false, we tell the host we *do not* need more data
82+
//Given true, we tell the host we are ready for more data
8083
void updateRTS(bool assertRTS)
8184
{
8285
rtsAsserted = assertRTS;
@@ -300,7 +303,7 @@ void updateSerial()
300303
//Assert RTS when there is enough space in the receive buffer
301304
if ((!rtsAsserted) && (availableRXBytes() < (sizeof(serialReceiveBuffer) / 2))
302305
&& (availableTXBytes() <= RTS_ON_BYTES))
303-
updateRTS(true);
306+
updateRTS(true); //We're ready for more data
304307

305308
//Attempt to empty the serialTransmitBuffer
306309
outputSerialData(false);

0 commit comments

Comments
 (0)