File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ bool isCTS()
1414{
1515 if (pin_cts == PIN_UNDEFINED) return (true ); // CTS not implmented on this board
1616 if (settings.flowControl == false ) return (true ); // CTS turned off
17- return (digitalRead (pin_cts) == HIGH) ^ settings.invertCts ;
17+ // The SAMD21 specification (page 448) indicates that CTS is low when data is flowing
18+ return (digitalRead (pin_cts) == LOW) ^ settings.invertCts ;
1819}
1920
2021#define NEXT_RX_TAIL (n ) ((rxTail + n) % sizeof (serialReceiveBuffer))
@@ -80,7 +81,8 @@ void updateRTS(bool assertRTS)
8081{
8182 rtsAsserted = assertRTS;
8283 if (settings.flowControl && (pin_rts != PIN_UNDEFINED))
83- digitalWrite (pin_rts, assertRTS ^ settings.invertRts );
84+ // The SAMD21 specification (page 448) indicates that RTS is low to enable data flow
85+ digitalWrite (pin_rts, (assertRTS ? 0 : 1 ) ^ settings.invertRts );
8486}
8587
8688// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
You can’t perform that action at this time.
0 commit comments