Commit graph

446 commits

Author SHA1 Message Date
Jason2866
e942ba1de2
hal/usb_serial_jtag_ll.h only C3, H2, S3 2022-03-17 17:44:36 +01:00
me-no-dev
2330e9992f Fix reboot into download from TinyUSB on ESP32-S3
Requires manual reboot back into the new firmware after flashing has finished
2022-03-17 04:27:27 +02:00
me-no-dev
f2d081fbe7 Add helper script for updating the core version 2022-03-10 20:17:55 +02:00
Me No Dev
12c6599280
Merge branch 'master' into esp32-s3-support 2022-03-10 19:01:20 +02:00
Tomáš Pilný
68daea4a4a
Implemented tone and noTone; fixes #980 (#6402)
* Implemented tone
* Tone uses queue; implemented setToneChannel
2022-03-10 17:26:30 +02:00
Me No Dev
f61b0eb2dd
Merge branch 'master' into esp32-s3-support 2022-03-10 16:33:53 +02:00
Rodrigo Garcia
883241229e
Allows setting only one pin (rx or tx) in the first begin() (#6394) 2022-03-10 15:33:27 +02:00
P-R-O-C-H-Y
66596fa581
Fix ledc panic’ed when wrong setup of frequency and bit width (#6371)
* Fixed LEDC panic when wrong bit widht / frequency set.

* Fixed ledc example to be working on all SOCs
2022-03-10 15:30:57 +02:00
Rodrigo Garcia
3a7dfa14db
Fixes rmtDeinit() and tests RX/TX before operations (#6369)
* Fixes rmtDeinit() and tests RX/TX before operations

* Optimizes final binary size

* Typo
2022-03-10 15:19:15 +02:00
Me No Dev
b7c018d0e3
Merge branch 'master' into esp32-s3-support 2022-03-02 17:16:01 +02:00
Andreas Merkle
4da1051266
Bugfix of the following problems: Invalid variable argument list used to retrieve length. If length is greater or equal than the available buffer, a memory leak will happen because va_end() is missing. (#6360) 2022-03-02 15:25:59 +02:00
Rodrigo Garcia
7d4992a811
Adds C++ std::function to Serial.onReceive() (#6364)
* Adds C++ std::function to Serial.onReceive()

* fixes LOCK macro when disabled
2022-03-02 15:20:43 +02:00
Verkehrsrot
c2e5957f35
Update esp32-hal-log.h (#6358)
#ifdef added, to avoid compiler redefinition warnings for LOG_LOCAL_LEVEL if defined by application, and we USE_ESP_IDF_LOG
2022-02-28 16:50:07 +02:00
Verkehrsrot
4f7e88a177
Fixes build error if TAG is const (#6351) 2022-02-28 14:30:33 +02:00
me-no-dev
fef7fb39fe Add guard to USB examples 2022-02-23 23:45:04 +02:00
me-no-dev
1c57cf0bd6 Merge branch 'master' into esp32-s3-support 2022-02-23 16:32:35 +02:00
P-R-O-C-H-Y
a57cac63e4
Timer API docs + esp32-hal-timer.h edit (#6335) 2022-02-23 15:59:20 +02:00
Rodrigo Garcia
50e9772ecf
Fixes UART pin setting + adds CTS/RTS HW Flow Control (#6272)
* 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
2022-02-17 03:28:46 +02:00
P-R-O-C-H-Y
01303b700d
ADC esp32s2 attenuation fix for DAC pins (#6282)
* ADC esp32s2 attenuation fix for DAC pins

* Use soc define instead config target
2022-02-16 15:45:06 +02:00
P-R-O-C-H-Y
c7cc5c90eb
GPIO refactoring (#6259)
* 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
2022-02-16 14:43:38 +02:00
me-no-dev
c0ed66e373 Merge branch 'master' into esp32-s3-support 2022-02-05 13:06:11 +02:00
Rodrigo Garcia
7eec41dcb5
Fixes Touch Sensor for ESP32-S3 and any future SoC (#6234)
* Fixes digitalPinToTouchChannel() for ESP32-S3
2022-02-05 11:54:01 +02:00
P-R-O-C-H-Y
9dbc908784
FIX ledc on ESP32C3 (#6229) 2022-02-04 15:55:28 +02:00
Tomáš Pilný
747b6d0f59
[FEATURE] Basic implementation of Arduino's I2S library (#5304)
Basic version of Arduino's I2S library. We currently support only 16bps + 16000 Hz sampling frequency. Other bitrates and sample rates will print warning and continue to operate, however the resulting audio quality may be poor.
There will be further effort to fix these issues.
2022-02-04 13:25:53 +02:00
s-hadinger
6591f5bd4c
Fix replace() failing (#6224) 2022-02-03 20:07:34 +02:00
me-no-dev
b70fedca44 Merge branch 'master' into esp32-s3-support 2022-02-03 19:07:42 +02:00
Rodrigo Garcia
0ea485e518
Touch Sensor IDF Refactoring (#6194)
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 #6095
Fix #6034
Fix #5799
Fix #5745
Fix #5527
Fix #5493
Fix #4321
Fix #4044
Fix #2722
Fix #2625
2022-02-03 19:06:12 +02:00
me-no-dev
82e41de446 WIP: Initial support for PSRAM (QSPI and OPI) 2022-02-02 03:10:01 +02:00
me-no-dev
c210d24a13 small adjustments for NVS and PSRAM init 2022-02-01 19:54:50 +02:00
me-no-dev
46f283a886 Merge branch 'master' into esp32-s3-support 2022-02-01 14:00:33 +02:00
IanSC
5be3ff74ea
Unnecessary operation removed from map() in WMath.cpp (#6218)
* 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
2022-02-01 13:26:52 +02:00
me-no-dev
2299de5ef9 Initial SPI support and S3-Box variant 2022-02-01 11:12:46 +02:00
Rodrigo Garcia
b75a08c955
Fixes UART_1 TX Pin setup
When passing the PR to this branch, it seems that the change to this line was forgotten.
2022-01-31 08:20:36 -03:00
mrengineer7777
9fe34f6553
Resolve WString TODO (#6190)
Resolve TODO (XXX) by logging warning message.
2022-01-31 13:07:37 +02:00
Rodrigo Garcia
39a2080922
Fixes onReceive deadlock (#6201) 2022-01-31 13:03:43 +02:00
me-no-dev
1116f2dc3b Merge branch 'master' into esp32-s3-support 2022-01-31 12:49:45 +02:00
Rodrigo Garcia
ce68d72157
Fixes UART1 and UART2 default pins for ESP32-S3 (#6202)
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.
2022-01-31 12:46:09 +02:00
Jason2866
1d44d5f199
fix S3 flash image base (#6208) 2022-01-31 12:39:58 +02:00
me-no-dev
2d51d0e128 Update esp32-hal-tinyusb.c 2022-01-23 00:50:51 +02:00
me-no-dev
17be328b32 Update USB.cpp 2022-01-22 23:03:29 +02:00
me-no-dev
9c3f5aa5de Update HWCDC.cpp 2022-01-22 15:05:34 +02:00
me-no-dev
e73d35fac4 Rework USB selection 2022-01-21 13:44:27 +02:00
me-no-dev
9556169994 Update Esptool and add some missing adjustments 2022-01-21 03:27:13 +02:00
me-no-dev
6326608275 Initial S3 Support
Just so we can compile and test! Some things might/will not work. SPI and UART baud detect need to be looked at.
2022-01-21 00:43:07 +02:00
P-R-O-C-H-Y
a5932064f9
Fixing interrupts in LEDC (#6160)
Fixes: #6140
2022-01-20 13:09:25 +02:00
mrengineer7777
460af2e1a5
Fix I2C Slave Compile (#6108)
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>
2022-01-17 16:29:50 +02:00
Juraj Andrássy
e84e9c153e
Print.flush() - Arduino API conformance (#6084) 2022-01-17 16:12:22 +02:00
vortigont
b3b3403296
NTP Examples: revert obsolete comment and updated Time example (#6073)
* 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 6b1020967a171c549b3d956825fd0d395de9cce0.

* SimpleTime: add NTPoDHCP option and TimeZone env variable
2022-01-17 16:09:58 +02:00
Rodrigo Garcia
c014eaf352
Adds UART RX IRQ Callback with onReceive() (#6134)
* Adds UART RX IRQ Callback with onReceive()
2022-01-17 16:04:12 +02:00
Rodrigo Garcia
5ae3886c66
Fixes UART MODBUS and Loopback issue (#6133) 2022-01-17 14:54:13 +02:00