HardwareSerial Available For Write (#9319)
* feat(uart): setBufferSize It makes sure that setting TX buffer size will match availableForWrite() response. It also sets the buffer to the minimum instead of doing nothing and returning an error. For RX Buffer, it sets the minimum and also don't return an error. This makes the APIs better and easy to understand its results. * feat: sets TX buffer This will allow to set TX buffer to a minimum with no error message. It also makes it works as in the Arduino API specification that is to return the buffer available space. In ESP32 case it will be the minmum the HW TX FIFO size of 128 bytes. * feat: adjust availableForWrite This change will make sure that if no TX Ringbuffer is used, it will return the UART FIFO available space. Otherwise, it will return the Ringbuffer available space, as defined in the Arduino especification.
Showing
Please register or sign in to comment