Serial.flush should change to Serial.flush(uint32_t data_width, uint32_t parity, uint32_t stop) #5094
Labels
component: core
level: easy
type: enhancement
waiting for feedback
Waiting on additional info. If it's not received, the issue may be closed.
Milestone
Platform
Settings in IDE
Problem Description
I am building a Rs485 project. So esp has to control RE and DE pins. I have done some test and finaly find a easy way (for me at least). I added second flush function like:
I belive in the HardwareSerial.h file the prototype should change:
void flush(uint32_t data = 8_width, uint32_t parity = 0, uint32_t stop = 1);
I user using serial port with default settings (8N1) then user dont have to anything. Otherwise, function must call with serial config parameters.
With this function, esp can handle tx enable, rx enable nicely.
What do you think? Is there any better way to handle RS485 comm direction problem?
NOTE: I am not a cpp expert.
The text was updated successfully, but these errors were encountered: