arduino-esp32/cores/esp32
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
..
apps/sntp Update IDF to 3.2-3276a13 and esptool.py to 2.5.0 (#1878) 2018-09-21 08:39:36 +02:00
libb64 Fix the execute bit of some files. (#5986) 2021-12-14 14:24:44 +02:00
Arduino.h Implemented tone and noTone; fixes #980 (#6402) 2022-03-10 17:26:30 +02:00
base64.cpp Base64::encode : const correctness / String by reference passing (#3314) 2019-10-02 14:29:24 +03:00
base64.h Revert "Update licenses" 2021-03-11 12:11:53 +02:00
binary.h initial import 2016-10-06 07:09:44 -06:00
cbuf.cpp Fix cbuf not being able to hold the full length 2017-01-24 17:57:44 +02:00
cbuf.h cbuf: allow inheritance (#5883) 2021-11-18 14:25:04 +02:00
Client.h Remove extra connects from Client.h (#3191) 2019-09-09 09:36:22 +03:00
Esp.cpp Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
Esp.h Use cpu_hal_get_cycle_count for all chips 2021-04-19 14:25:09 +03:00
esp32-hal-adc.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-adc.h Fix pin attenuation being overwritten (#5399) 2021-07-16 17:34:25 +03:00
esp32-hal-bt.c Revert "Update licenses" 2021-03-11 12:11:53 +02:00
esp32-hal-bt.h Revert "Update licenses" 2021-03-11 12:11:53 +02:00
esp32-hal-cpu.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-cpu.h Revert "Update licenses" 2021-03-11 12:11:53 +02:00
esp32-hal-dac.c Implement DAC based on ESP-IDF API (#5959) 2021-12-14 21:10:30 +02:00
esp32-hal-dac.h Implement DAC based on ESP-IDF API (#5959) 2021-12-14 21:10:30 +02:00
esp32-hal-gpio.c GPIO refactoring (#6259) 2022-02-16 14:43:38 +02:00
esp32-hal-gpio.h GPIO refactoring (#6259) 2022-02-16 14:43:38 +02:00
esp32-hal-i2c-slave.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-i2c-slave.h Fix the execute bit of some files. (#5986) 2021-12-14 14:24:44 +02:00
esp32-hal-i2c.c Fix I2C clock stretching issue with ESP32 (#5910) 2021-11-19 18:43:59 +02:00
esp32-hal-i2c.h Implement Thread-Safe I2C based on ESP-IDF API (#5683) 2021-10-01 17:34:20 +03:00
esp32-hal-ledc.c Fix ledc panic’ed when wrong setup of frequency and bit width (#6371) 2022-03-10 15:30:57 +02:00
esp32-hal-ledc.h Added method to change the ledc PWM frequency programmatically (#5003) 2021-04-17 02:06:58 +03:00
esp32-hal-log.h Update esp32-hal-log.h (#6358) 2022-02-28 16:50:07 +02:00
esp32-hal-matrix.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-matrix.h Revert "Update licenses" 2021-03-11 12:11:53 +02:00
esp32-hal-misc.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-psram.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-psram.h v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
esp32-hal-rmt.c Fixes rmtDeinit() and tests RX/TX before operations (#6369) 2022-03-10 15:19:15 +02:00
esp32-hal-rmt.h RMT refactoring based on IDF (#6024) 2021-12-21 15:02:40 +02:00
esp32-hal-sigmadelta.c Implement SigmaDelta based on ESP-IDF API (#6053) 2021-12-22 16:41:52 +02:00
esp32-hal-sigmadelta.h Implement SigmaDelta based on ESP-IDF API (#6053) 2021-12-22 16:41:52 +02:00
esp32-hal-spi.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-spi.h Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-time.c NTP Examples: revert obsolete comment and updated Time example (#6073) 2022-01-17 16:09:58 +02:00
esp32-hal-timer.c Timer based od ESP-IDF (#5931) 2021-12-14 15:46:39 +02:00
esp32-hal-timer.h Timer API docs + esp32-hal-timer.h edit (#6335) 2022-02-23 15:59:20 +02:00
esp32-hal-tinyusb.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-tinyusb.h Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-touch.c Touch Sensor IDF Refactoring (#6194) 2022-02-03 19:06:12 +02:00
esp32-hal-touch.h Touch Sensor IDF Refactoring (#6194) 2022-02-03 19:06:12 +02:00
esp32-hal-uart.c Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
esp32-hal-uart.h Adds HardwareSerial::setTxBufferSize() (#6383) 2022-03-28 11:37:12 +03:00
esp32-hal.h Allows user to bypass PSRAM test and boot faster with WROVER (#6135) 2022-01-17 14:47:08 +02:00
esp8266-compat.h v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
esp_arduino_version.h Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
firmware_msc_fat.c Calculate properly Firmware MSC fat table sectors 2021-10-13 15:39:36 +03:00
firmware_msc_fat.h Add initial support for USB MSC (#5466) 2021-08-02 15:35:13 +03:00
FirmwareMSC.cpp Calculate properly Firmware MSC fat table sectors 2021-10-13 15:39:36 +03:00
FirmwareMSC.h Implement USB HID Device Support for ESP32-S2 (#5538) 2021-08-23 17:27:34 +03:00
FunctionalInterrupt.cpp v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
FunctionalInterrupt.h Revert "Update licenses" 2021-03-11 12:11:53 +02:00
HardwareSerial.cpp Adds HardwareSerial::setRxTimeout() (#6397) 2022-03-28 14:18:30 +03:00
HardwareSerial.h Adds HardwareSerial::setRxTimeout() (#6397) 2022-03-28 14:18:30 +03:00
HWCDC.cpp Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
HWCDC.h Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
IPAddress.cpp const correctness (#89) 2016-12-12 01:32:55 +02:00
IPAddress.h const correctness (#89) 2016-12-12 01:32:55 +02:00
IPv6Address.cpp Revert "Update licenses" 2021-03-11 12:11:53 +02:00
IPv6Address.h Revert "Update licenses" 2021-03-11 12:11:53 +02:00
main.cpp Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
MD5Builder.cpp Migrate MD5Builder to use esp_rom functions directly rather than rely on wrappers that can be omitted from compilation based on sdkconfig. (#5941) 2021-12-14 15:49:43 +02:00
MD5Builder.h Migrate MD5Builder to use esp_rom functions directly rather than rely on wrappers that can be omitted from compilation based on sdkconfig. (#5941) 2021-12-14 15:49:43 +02:00
pgmspace.h Fix issue 4095 (#4503) 2020-11-08 04:55:59 +02:00
Print.cpp Extend Print class for 64bit integers. (#3688) 2020-09-30 14:31:36 +03:00
Print.h Print.flush() - Arduino API conformance (#6084) 2022-01-17 16:12:22 +02:00
Printable.h initial import 2016-10-06 07:09:44 -06:00
Server.h Update IDF to aaf1239 (#1539) 2018-06-27 09:01:06 +02:00
stdlib_noniso.c Fixes String(float) issue with Stack Smashing (#6138) 2022-01-17 14:44:49 +02:00
stdlib_noniso.h Fixes String(float) issue with Stack Smashing (#6138) 2022-01-17 14:44:49 +02:00
Stream.cpp Fix double promotion in Stream::parseFloat() (#5846) 2021-11-04 14:24:28 +02:00
Stream.h Print.flush() - Arduino API conformance (#6084) 2022-01-17 16:12:22 +02:00
StreamString.cpp StreamString SSO fix (#2736) 2019-05-11 11:16:05 +03:00
StreamString.h Convert the few remaining cr/lf files to use lf for eol. (#1316) 2018-04-16 16:34:39 +02:00
Tone.cpp Implemented tone and noTone; fixes #980 (#6402) 2022-03-10 17:26:30 +02:00
Udp.h Add virtual beginMulticast(...) stub to UDP class (#4061) 2020-11-02 20:26:50 +02:00
USB.cpp Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
USB.h Implement USB HID Device Support for ESP32-S2 (#5538) 2021-08-23 17:27:34 +03:00
USBCDC.cpp Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
USBCDC.h Esp32 s3 support (#6341) 2022-03-28 12:09:41 +03:00
USBMSC.cpp Implement USB HID Device Support for ESP32-S2 (#5538) 2021-08-23 17:27:34 +03:00
USBMSC.h Implement USB HID Device Support for ESP32-S2 (#5538) 2021-08-23 17:27:34 +03:00
WCharacter.h Wiring.h -> Arduino.h 2016-10-06 07:09:45 -06:00
wiring_private.h Do not include file that does not exist 2016-11-13 13:26:49 +02:00
wiring_pulse.c Rework pulseIn to work on ESP32-C3 2021-08-02 14:53:11 +03:00
wiring_shift.c Trailing spaces (#3738) 2020-11-02 22:11:26 +02:00
WMath.cpp Unnecessary operation removed from map() in WMath.cpp (#6218) 2022-02-01 13:26:52 +02:00
WString.cpp Fix replace() failing (#6224) 2022-02-03 20:07:34 +02:00
WString.h Fixes String(float) issue with Stack Smashing (#6138) 2022-01-17 14:44:49 +02:00