No description
Find a file
Gonzalo Brusco c26e3f4299
Adds HardwareSerial::setRxTimeout() (#6397)
* 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>
2022-03-28 14:18:30 +03:00
.github Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
cores/esp32 Adds HardwareSerial::setRxTimeout() (#6397) 2022-03-28 14:18:30 +03:00
docs Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
libraries Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
package Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
tests Add initial hardware testing support (#6313) 2022-03-10 14:45:26 +02:00
tools Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
variants add variant init code for the feather s2 tft (#6447) 2022-03-28 12:58:25 +03:00
.gitignore Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
.gitmodules v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
boards.txt Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
CMakeLists.txt Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
component.mk Fix compilation errors when used as IDF component 2019-01-26 21:37:03 +01:00
CONTRIBUTING.rst Add files via upload - CONTRIBUTING.rst (#5138) 2021-05-18 13:54:25 +03:00
idf_component.yml Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
Kconfig.projbuild v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
LICENSE.md Add LGPL 2.1 License 2019-04-16 03:08:50 +02:00
Makefile.projbuild Remove duplicate ota_data flashing under IDF 2018-08-16 13:34:47 +02:00
package.json Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
platform.txt Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
programmers.txt initial import 2016-10-06 07:09:44 -06:00
README.md Adding Issue and Feature template (#5999) 2021-12-14 16:05:36 +02:00

Arduino core for the ESP32, ESP32-S2 and ESP32-C3

Build Status Documentation Status

Need help or have a question? Join the chat at https://gitter.im/espressif/arduino-esp32

Contents

Development Status

Latest Stable Release Release Version Release Date Downloads

Latest Development Release Release Version Release Date Downloads

Documentation

You can use Arduino-ESP32 Online Documentation to get all information about this project.

Supported Chips

Visit the supported chips documentation to see the list of current supported ESP32 SoCs.

Decoding exceptions

You can use EspExceptionDecoder to get meaningful call trace.

Issue/Bug report template

Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as Type: For reference.

Finally, if you are sure no one else had the issue, follow the Issue template or Feature request template while reporting any new Issue.

Contributing

We welcome contributions to the Arduino ESP32 project!

See contributing in the documentation for more information on how to contribute to the project.