* Minimize HardwareSerial Receive and Transmit delays
* Remove uartRxFifoToQueue from esp-hal-uart.h
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* `ledcWriteTone()` added a `apbcallback()` evertime the tone value was non zero.
* `addApbChangeCallback()` did not detect duplicate callbacks.
* changed the apbcallback list to a double link to support roll forward, roll back execution. This made the sequences of clock change callback start with the newest registered -> to oldest on the `before` then oldest -> newest after the clock change. This made the UART debug log output have minimal gibberish during the clock change.
* change how the UART callback handled the MUTEX because if any `apbchangeCallback()` executed a `log_x()` a deadlock would occur.
This fixes#3555
* 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()
* Add APB change callbacks and move cpu code to own file
* Properly set esp_timer and FreeRTOS tick dividers
* Improve updated devisors
* No need to update REF_TICK yet
* Add initial handling for UART baud change
* fix uartWriteBuf and uartDetectBaudrate
* trigger callbacks even when APB did not change
* toggle UART ISR on CPU change
* add XTAL freq getter and add cpu freq validation
* Support CPU frequency changes in I2C (#2287)
**esp32-hal-i2c.c**
* add callback for cpu frequency changes
* adjust fifo thresholds based on cpu frequency and i2c bus frequency
* reduce i2c bus frequency if differential is too small
**Wire.h**
* version to 1.1.0
* Implement clock change for the other peripherals
* remove bad CPU clock values from the menu
* Add note to CPU freqs that support WiFi and BT
* Add support to HAL for APB frequencies different than 80MHz
* Add support for CPU frequencies in the IDE board menu
* Switch to fast set_config
* Add method to uart so debug can be reassigned after apb frequency switch
* Return real APB frequency
* 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
* uartEnd: Unlock mutex before detaching rx and tx
This should solve the device freezing issue when Serial.end() is called
* Unlock UART MUTEX only for detaching Rx and Tx
* Thanks to @me-no-dev for pointing it out that
uart->dev->conf0.val can be inside mutex lock
IDF Options:
- Autostart Arduino (implements app_main)
- Disable HAL locks
- Set HAL debug level
- Auto-connect STA if configured (else will connect after WiFi.begin())