* Adjustable Serial Event Task Stack Size And Priority
* Added options to Kconfig
* Added Core Affinity
* Added CONFIG_FREERTOS_UNICORE
* Removed _CONFIG from FREERTOS_UNICORE
* Fixing Core choice for OnReceive()
Makes it alligned to changes in #6718
Also eliminates conflict with #6718 for merging
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* Adds HardwareSerial::onReceiveTimeout()
* Fixed typo
* Changes requested
* Fix eventQueueReset
* Changed _onReceiveTimeout to _rxTimeout for consistency
* Uniform uart_set_rx_timeout condition
* test _uart not NULL in eventQueueReset()
check if _uart is not NULL before using it.
* revert last commit - no need for it
reverting last change made - it is not necessary.
* adds onReceive() parameter
In order to allow the user to choose if onReceive() call back will be called only when UART Rx timeout happens or also when UART FIFO gets 120 bytes,
a new parameter has been added to onReceive() with the default behavior based on timeout.
void onReceive(OnReceiveCb function, bool onlyOnTimeout = true);
onReceive will setup a callback that will be called whenever an UART interruption occurs (UART_INTR_RXFIFO_FULL or UART_INTR_RXFIFO_TOUT)
UART_INTR_RXFIFO_FULL interrupt triggers at UART_FULL_THRESH_DEFAULT bytes received (defined as 120 bytes by default in IDF)
UART_INTR_RXFIFO_TOUT interrupt triggers at UART_TOUT_THRESH_DEFAULT symbols passed without any reception (defined as 10 symbos by default in IDF)
onlyOnTimeout parameter will define how onReceive will behave:
Default: true -- The callback will only be called when RX Timeout happens.
Whole stream of bytes will be ready for being read on the callback function at once.
This option may lead to Rx Overflow depending on the Rx Buffer Size and number of bytes received in the streaming
false -- The callback will be called when FIFO reaches 120 bytes and also on RX Timeout.
The stream of incommig bytes will be "split" into blocks of 120 bytes on each callback.
This option avoid any sort of Rx Overflow, but leaves the UART packet reassembling work to the Application.
* Adds onReceive() parameter for timeout only
* Adds back setRxTimeout()
* Adds setRxTimeout()
* CI Syntax error - "," missing
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* Adds HardwareSerial::setTxBufferSize()
* uartBegin def fix
* checks TXBufferSize as defined in IDF
Makes sure that the buffer size will not cause a reset to the board.
* Removes double value in Rx/Tx Buffer Size
Keeps Rx/Tx buffer size as set, not doubling it. It makes the process more clear.
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* fixes setPins and begin to keep rx/tx unmodified
* adds Hardware Flow Control mode and CTS/RTS pin setting
* adds Hardware Flow Control mode and CTS/RTS pin setting
* adds Hardware Flow Control mode and CTS/RTS pin setting
* adds Hardware Flow Control mode and CTS/RTS pin setting
* Code Review
Summary
This PR fixes an issue with UART1 default pins.
When using pins RX_1 = 18 and TX_1 = 17, UART1 will display a Break Error on those pins when they are floting (not connected).
It also defines RX_2 = 19 and TX_2 = 20 as default pins for UART2.
Impact
The deaulf pins may look different from the original pinout diagram.
## Summary
This PR is a complete reffactoring of UART Serial Hardware and respective HAL in order to use IDF instead of current Register manipulation approach.
It implements Arduino SerialEvent functionality.
Fix#5287Fix#5273Fix#5519Fix#5247Fix#5403Fix#5429Fix#5047Fix#5463Fix#5362Fix#5112Fix#5443
## Impact
It solves many reported issues related to UART.
It was tested and works fine for ESP32, ESP-S2 and ESP32-C3.
* Add initial support for USB MSC
* Add Firmware Upload/Download With MSC
Current running firmware is available as file inside the MSC Disk. To update the firmware on the ESP, just copy a regular firmware bin into the drive
* Support overwriting of the firmware file
Overwriting a file is done totally differently on MacOS, Windows and Linux. This change supports it on all of them.
* Allow CDC, FirmwareMSC and DFU to be enabled on boot
* Add example ESP32-S2 USB-ONLY board
* Various device code optimizations
Added `end()` methods to MSC classes
Made begin() methods safe to be called multiple times
Optimized CDC class
* Fix CDC Connect/Disconnect detection in Arduino IDE on Windows
* Rework cdc_write
* Update ESP32-S2 board configs
workaround for #5043. There is a timing issue with HardwareSerial::end. I'm not sure what is hung, but it should be possible to see this in jtag, as it does cause a reboot if you let it. The delay needs to be before you detach the device!?
* API compatibility to AVR, ESP8266, et al
* Add non-blocking HardwareSerial::read(buffer, size) extension (ESP8266 portability)
* Refactor for fewer indirect calls.
* add option to Flush() to only clear txQueue
Add the option to cause Flush() to just wait for tx data to clear the tx fifo and uart, leave the rx queue and rx fifo as is.
* support tx only flush()
* support tx only Flush()
* support txOnly for Flush()
* compatibility to Stream()
* compatibility for Stream()
* default value error
* default value error
* Update esp32-hal-uart.h
* Update esp32-hal-uart.c
* Update HardwareSerial.cpp
* sp
* correctly implement flushTxOnly()
* Expose uartStartDetectBaudrate(uart_t *) in esp32-hal-uart.h and call it from HardwareSerial::begin() if baudrate detection is requested (by passing a baudrate of 0) to solve baudrate detection problems
* Avoid a division by zero error in uartGetBaudRate()
* Added baudrate detection to esp32-hal-uart and HardwareSerial
* Solved compiler warning for uartResizeRxBuffer()
* Add unit to header variable name (timeout_ms)
* Reverting accidentally changed files to master
* Add small delay after baudrate detection
* TX Flow Control and Code cleanup
* Use semaphore instead of delay
TX functionality is done.
* Use single buffer and empty queue on exit
* Fix compile issues because of LwIP code relocation
* Add temporary header to fix Azure not compiling
* Fix AsyncUDP early init
* AsyncUDP Multicast fixes
* Add source mac address and rework multicast
* Allow redefinition of default pins for Serials 1 and 2
* Update IDF to 3276a13
* Update esptool.py to 2.5.0
* Fix sketches
* Fix log level in BluetoothSetial
If you develop on windows and need cr/lf files, see this:
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace
Git can handle this by auto-converting CRLF line endings into LF
when you add a file to the index, and vice versa when it checks out
code onto your filesystem. You can turn on this functionality with
the core.autocrlf setting. If you're on a Windows machine, set it
to true - this converts LF endings into CRLF when you check out code:
$ git config --global core.autocrlf true