Skip to content

Commit 6b257a1

Browse files
authored
Update HardwareSerial.h
1 parent 60299cd commit 6b257a1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cores/esp32/HardwareSerial.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ class HardwareSerial: public Stream
107107
void setDebugOutput(bool);
108108

109109
void setRxInvert(bool);
110-
void setPins(uint8_t rxPin, uint8_t txPin);
110+
111+
// Negative Pin Number will keep it unmodified, thus this function can set individual pins
112+
// SetPins shall be called after Serial begin()
113+
void setPins(int8_t rxPin, int8_t txPin, int8_t ctsPin = -1, int8_t rtsPin = -1);
114+
// Enables or disables Hardware Flow Control using RTS and/or CTS pins (must use setAllPins() before)
115+
void setHwFlowCtrlMode(uint8_t mode = HW_FLOWCTRL_CTS_RTS, uint8_t threshold = 64); // 64 is half FIFO Length
116+
111117
size_t setRxBufferSize(size_t new_size);
112118

113119
protected:

0 commit comments

Comments
 (0)