* 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
* GPIO refactoring
GPIO now using ESP-IDF API on all chips.
LEDC interrupt fix removed - no longer needed.
Edited pins_arduino.h in variants according to changes in gpio.
* Edited analog channels functions
Summary
Touch Sensor refactoring to be based on IDF 4.4.
Adds support to ESP32S2 and future ESP32S3.
Adds some new APIs:
For all chips:
void touchAttachInterruptArg(uint8_t pin, void (*userFunc)(void*), void *arg, uint32_t threshold);
This function allows the user to add and pass a void* parameter to the ISR user callback.
void touchDetachInterrupt(uint8_t pin);
This function detaches ISR call back for the touch pad pin.
Only ESP32 chip
void touchInterruptSetThresholdDirection(bool mustbeLower);
This function allows the user to set if the ISR callback will be activated when the touch sensor readings are lower or higher than the threshold defined. See example TouchButton.ino.
Only ESP32-S2 and ESP32-S3 chips
bool touchInterruptGetLastStatus(uint8_t pin);
This function reports if the touch pad pin is touched or untouched. It can be used with ISR to identify when it is touched and untouched (released). See example TouchButtonV2.ino.
Impact
None. ll original APIs and examples now run on ESP32 and ESP32-S2.
Related links
Fix#6095Fix#6034Fix#5799Fix#5745Fix#5527Fix#5493Fix#4321Fix#4044Fix#2722Fix#2625
* Unneccesary Operation Removed
(A) extra operation not needed and incorrect:
wrong by 0.5 but happens to be thrown out
( delta * dividend + (divisor / 2) ) / divisor
delta * dividend divisor
= ---------------- + -----------
divisor 2 * divisor
= delta * dividend / divisor + 1/2
(B) check first before doing other computations
(C) changed to rise/run, easier for future maintainer
since it's closer to equation of a line
(D) before: mult, shift, add, div, add
now: mult, div, add
(E) error message easier to trace where thrown
* Update WMath.cpp
forgot to change variable name
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.
I2C Slave currently doesn't compile for projects where Arduino is an IDF component. This adds missing conditionals.
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* Revert "Examples update, add a note for configTime() that only one ntp server is supported by lwip",
fixed in espressif/esp32-arduino-lib-builder#51
This reverts commit 6b1020967a.
* SimpleTime: add NTPoDHCP option and TimeZone env variable
Summary
This PR is refactoring of SigmaDelta HAL in order to use IDF instead of current Register manipulation approach.
Impact
Change in API:
uint32_t sigmaDeltaSetup(uint8_t channel, uint32_t freq);
changed to -->
uint32_t sigmaDeltaSetup(uint8_t pin, uint8_t channel, uint32_t freq);
void sigmaDeltaAttachPin(uint8_t pin); removed, no longer needed. Pin is attached in sigmaDeltaSetup()
Summary
RMT HAL refactoring based on IDF.
Impact
Improves RMT by adding IDF v4.4 support.
Receiving RMT can handle any size of data.
rmtInit() has a new parameter - RxBufferSize - to hold any number of data when receiving RMT.
rmtWrite() has a new parameter - wait_tx_done - to block writing until sending all data.
Related links
fix#5905
This PR is refactoring of LEDC HAL in order to use IDF instead of current Register manipulation approach.
Fixing duty -> if all bits in resolution are set -> FULL ON
## Summary
Arduino ```setup()``` and ```loop()``` run under a Task with a fixed Stack size of 8KB.
Users may want to change this size.
This PR adds this possibility by just adding a line of code, as for example:
``` dart
ESP_LOOP_TASK_STACK_SIZE(16384);
void setup() {
}
void loop() {
}
```
## Impact
None. It adds a new functionality to ESP32 Arduino.
If ```ESP_LOOP_TASK_STACK_SIZE(newSize);``` is not declared/used, it will compile the sketch with the default stack size of 8KB.
## Related links
fix#6010https://github.com/espressif/arduino-esp32/issues/6010#issuecomment-992701658
Thanks @igrr for the suggestion!
HardwareSerial flush() was returning before all data was sent out through serial port.
This is a problem to some RS485 libraries that depend on it to signaling.
This PR solves the issue by forcing it to block flush() until all data is sent.
This PR is refactoring of DAC HAL in order to use IDF instead of current Register manipulation approach.
Edited dacWrite() to use ESP-IDF api.
Added dacDisable() so there is an option to disable dac channel.
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
- Remove the execute bit from source and text files.
- on-pages.sh script needs the execute bit to be set.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
Function analogReadResolution set how many bits will analogRead return.
Find out that this functionality was added back 2017 by @me-no-dev in #161.
Related issues:
#5163