Skip to content

Commit 9b6d123

Browse files
authored
Merge pull request #524 from sparkfun/release_candidate
Add comments to flow control calls
2 parents c8dc9dd + 3f7adee commit 9b6d123

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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);

Firmware/LoRaSerial/System.ino

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,9 +1100,6 @@ void updateLeds()
11001100
{
11011101
static uint8_t previousLedUse;
11021102

1103-
//If training button is being pressed, LEDs are being updated by that function
1104-
if (trainBtn != NULL && trainBtn->read()) return;
1105-
11061103
//When changing patterns, start with the LEDs off
11071104
if (previousLedUse != settings.selectLedUse)
11081105
{

0 commit comments

Comments
 (0)