Commit graph

591 commits

Author SHA1 Message Date
Me No Dev
6adeca446b
fix(cdc): Disable SOF interrupt and CDC reset on begin() (#9628)
* fix(cdc): Disable SOF interrupt and CDC reset on begin()

* feat(jtag/hwcdc): uses SOF detection from IDF

Restores back IDF 5.1 SOF detection method in order to fix the HW CDC uploading process.

Enabling SOF mask in the ISR routine causes a problem with esptool uploading when using CDC/JTAG port.

* feat(jtag/hwcdc): uses SOF detection from IDF

Restores back IDF 5.1 SOF detection method in order to fix the HW CDC uploading process.

Enabling SOF mask in the ISR routine causes a problem with esptool uploading when using CDC/JTAG port.

* feat: revert include 

This include is not necessary here.

Moving it back to the HWCDC.cpp file.

* feat: adding a necessary include 

Adding the IDF 5.1 SOF check include file.

Necessary to make it compile. Moved from HWCDC.h file to here.

* feat: move function call to header file

* feat: Moved SOF function

* feat: Removed unused header file

* fix: Use correct SOF header file

* ci(pre-commit): Apply automatic fixes

* Small fixes for Debug prints on C3, C6 and H2

* fix(usb): Fix log prints

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2024-05-15 13:58:45 +02:00
Jan Procházka
7acd875b78
fix(ledc): Match channel number with groups (#9638) 2024-05-15 13:16:28 +02:00
Rodrigo Garcia
c7b98a51aa
Update esp32-hal-uart.c (#9637) 2024-05-15 13:15:28 +02:00
Me No Dev
a3c8a48eed
fix(net): Add back the friend classes required for Ethernet.h to work (#9635) 2024-05-15 13:15:10 +02:00
Me No Dev
0c4b35e07e
IDF release/v5.1 (#9613)
* IDF release/v5.1 01b912a9e5

* Fix USB OTG Init on new IDF

* Delete libraries/TFLiteMicro/examples/micro_speech directory

Done in order to fix a CI problem created by an entire folder that was removed in original Library Repository.

* IDF release/v5.1 442a798083

* Update esp32-hal-tinyusb.c

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-05-14 01:04:12 +02:00
Happy Code Farm
a04fceee2f
feat(usbmsc): Add is_writable function to the USBMSC class. (#9569)
* (feat)usbmsc: Add is_writable function

Add is_writable function to the USBMSC class.
Allows USBMSC to be mounted in read-only mode.

* Update USBMSC.ino

Changes to USB Mass Storage (MSC) example code in Arduino USB library

* Added MSC.isWritable(true) line to set the disk as writable

* ci(pre-commit): Apply automatic fixes

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2024-05-13 15:10:45 +02:00
Rodrigo Garcia
7e7c01aadf
feat (hwcdc): ports changes made in 2.0.15 (#9565)
* feat (hwcdc): ports changes made in 2.0.15

Ports many changes, fixes and improvements made in 2.0.15:
- correct use of timeout
- avoids problems with CDC ISR not reading data
- fixes problems with transmitting many bytes to USB Host
- changes how USB SOF and CDC connection is detected

* feat (HWCDC) : port 2.0.15 

Changed header for a few functions.

* feat (HWCDC): port 2.0.15 upwards

Fixes include file that is not necessary any more.

- SOF is used directly now.

* fix (HWCDC): removes left over

Removes a left over function from previous 3.0.0 code.

- just removing unused code.

* ci(pre-commit): Apply automatic fixes

* fix: typo and commentaries

This fixes a few commentaries.

Just a typo error.

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2024-04-29 18:16:37 +03:00
Rodrigo Garcia
84086cd4a2
feat (uart): change log level of UART events (#9563)
Changes from Warning to Verbose UART errors/warnings in order to make debugging easier, specially with UART BREAK.
2024-04-29 18:15:40 +03:00
Unbinilium
b6f7d403d1
fix(hal-uart): truncated tx/rx buffer size (uint16_t -> uint32_t) (#9554) 2024-04-29 18:14:22 +03:00
Lucas Saavedra Vaz
6bfcd6d9a9
refactor(style): Change some style options (#9526)
* refactor(style): Change some style options

* refactor(style): Apply style changes
2024-04-19 18:16:55 +03:00
Me No Dev
4960d86ba2
Add support for PPP Modems to Arduino (#9518)
* feat(ppp): Add support for PPP Modems

* feat(sdk): Add libs with PPP enabled

* ci(pre-commit): Apply automatic fixes

* IDF c432c692fa (#9527)

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2024-04-19 15:50:50 +03:00
Darkl0ud
6b3a9a9bff
Fixed typo for adc_continuous_data typedef in esp32-hal-adc.h/.c (#9529)
* Fixed typo in adc_continuous_data typedef

Fixed typo in adc_continuous_data typedef

* Additional typo fix for adc_continuous_data typedef

Additional commit for previous commit (#9529) adding typo corrections within

1. /docs/en/api/adc.rst
2. /libraries/ESP32/examples/AnalogReadContinuous\AnalogReadContinuous.ino
3. tests/periman/periman.ino

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-04-19 12:42:41 +03:00
Jason2866
9caa3638f0
add LittleFS as partition type (#9354)
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-04-15 23:08:52 +03:00
Lucas Saavedra Vaz
da5c6ab9ae
Refactor repository with pre-commit hooks (#9515)
* Add Config

* Add Cache and remove pre-commit action

* [pre-commit.ci lite] apply automatic fixes

* Remove freeze

* Fix

* Update action

* Use latest stable Python 3 version

* Improve caching

* Improve cache tag

* Improve bot message

* fix(typos): Fix typos

* fix(typos): Fix more typos

* refactor(udp_server): Convert script from Python 2 to 3

* Fix whitespace

* Clang-format fixes

* Prettier fixes

* Black formatting

* Manual fixes

* Line endings

* Fix flake and make Vale manual

* Fix flake and reformat

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-04-15 19:40:56 +03:00
Rodrigo Garcia
34f5456f51
fix: HW CDC write() (#9401)
When writing a stream of data to the HW CDC of S3/C3/C6/H2, the SoC looses some bytes and don't send them all.

This fix makes it work fine.
2024-04-08 15:17:40 +03:00
Juraj Andrássy
205781b921
core Server class back to Arduino Core API version (#9447) 2024-04-02 20:40:37 +03:00
Holger Lembke
e92b4ca62b
Add: make digitalRead() for RGB_BUILTIN work (#9419)
* make digitalRead() for RGB_BUILTIN work

Standard Arduino-Way of blinking a LED can be the shortest with:

void loop() {
  static uint32_t ledticker = 0;
  if (millis() - ledticker > 1000) {
    ledticker = millis();
    digitalWrite(RGB_BUILTIN, !digitalRead(RGB_BUILTIN));
  }
}

Worked with the old LED_BUILTIN on Pin 2, now even works with Pin 48/neopixel.

* Add: make digitalRead() for RGB_BUILTIN work

Standard Arduino-Way of blinking a LED can be the shortest with:

void loop() {
  static uint32_t ledticker = 0;
  if (millis() - ledticker > 1000) {
    ledticker = millis();
    digitalWrite(RGB_BUILTIN, !digitalRead(RGB_BUILTIN));
  }
}

Worked with the old LED_BUILTIN on Pin 2, now even works with Pin 48/neopixel.

(Retry. Didn't sync my local sources. Sorry.)
2024-03-26 17:46:59 +02:00
Lucas Saavedra Vaz
f9bb62a91f
Add MacAddress string constructor (#9400)
* Add MacAddress string constructor

* Change implementation
2024-03-22 12:50:23 +02:00
Jan Procházka
fcef7395e8
fix(boards): Fixes needed to pass CI all-boards-test (#9390) 2024-03-20 14:11:35 +02:00
Jan Procházka
c17a688b62
Feature: New Class MacAddress similar to IPAddress (#9304)
* Added new classes MacAddress and MacAddress8

In the same style as class IPAddress.
Based on Apache License.

* Update MacAddress8.h

* Added Printable, constructor and extra operators

Added a few changes to make it closer to IPAddress Class implementation.

* Added construtor and Printable

Makes it closer to IPAddress Class implementation

* Fixes include Printable

* Update MacAddress.cpp

* Update MacAddress.h

* Update MacAddress.cpp

* Added Printable

* Added Printble and some more operators

* Cleanup and bounds checking

Moved implementation details .h->.cpp.  Added bounds checking on index operators.  Added constructor to MacAddress8 to match MacAddress.

* Fixed printTo

Chars must be uppercase to match toString() and pass test

* feat(MAC): Rework API to support both 6+8 bytes MacAddress

* feat(MAC): Remove MacAddress8.h file

* fix(MAC): Remove comment + reorder lines

* Update toString function with single buf and return

* Fix buffer size for toString

---------

Co-authored-by: David McCurley <44048235+mrengineer7777@users.noreply.github.com>
Co-authored-by: David McCurley <mrengineer02@gmail.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-03-18 15:45:00 +02:00
Rodrigo Garcia
0a26a8c4e3
Fixes HW Serial attaching pins, PHY initialization, crash after end() (#9365)
* fix: HWCDC pin number

Fixes HW Serial pin setup.

The pins were set up to the wrong value and it could not be correctly configured and used.

* fix: PHY initialization

Fixes the PHY initialization.

After detaching the pin and ending the HW Serial, a new begin() wouldn't start the CDC because it lacked the proper PHY initialization.

* fix: crashing end()

Fixes a crash when calling end()

end() treminanates the `tx_ring_buf` but it was not tested for NULL in the ISR and in the cdc0_write_char() causing a crash if those are used. This depends on events and happens eventually.

* reduces number of debug messages

* fix git stash/commit added lines

* fixes usb_phy_ll include and call

* roll back

* solves HWSerial initialization

* fixes C6|H2 issue

issue with `if(Serial)` not working always

* github commit problem

* fixes
2024-03-14 11:51:41 +02:00
Lucas Saavedra Vaz
dce754b693
Improve USBVendor Example (#9349)
* Add WebUSB console

* Improve Console Page

* Improve example

* Add comments

* Add flush method

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-03-11 15:10:46 +02:00
Rodrigo Garcia
b92ad5574a
fix: begin cts rts (#9353)
Begin() may undo a setpins() that has set RTS and/or CTS pin.
This pins are only changed with RTS and CTS.
setpins() can be called after or before begin()
when called before, begin() shall not change those pins.
2024-03-11 15:09:50 +02:00
Jan Procházka
6304aaf1c2
fix(spi): Update sck for C6,H2,C2 (#9335) 2024-03-05 14:23:50 +02:00
Rodrigo Garcia
a7fcf86826
fix: perimgr + begin (#9331)
* fix: perimgr + begin

Fixes Perimgr setup in begin()
Fixes issue with reset INTR mask preventing previous sent data to be read.
Adds a INTR mask to end() to clear all pending interrupts.

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update HWCDC.cpp

* Update HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp
2024-03-05 14:22:44 +02:00
Jason2866
5bcaf99ffd
Fix compile branch master as Arduino as component with latest IDF 5.1 (#9322)
* Fix compile with Lib Builder

with latest IDF 5.1.

* change function name
2024-03-05 11:02:10 +02:00
Andrew Dunai
629ffc55ed
fix(hal): force spiTransaction to update clock line immediately (#9221) (#9333) 2024-03-05 11:01:06 +02:00
Jason2866
20859d0be4
Update binary.h (#9323) 2024-03-05 10:54:00 +02:00
Rodrigo Garcia
58b9f079d2
HardwareSerial Available For Write (#9319)
* feat(uart): setBufferSize 

It makes sure that setting TX buffer size will match availableForWrite() response. It also sets the buffer to the minimum instead of doing nothing and returning an error.

For RX Buffer, it sets the minimum and also don't return an error.

This makes the APIs better and easy to understand its results.

* feat: sets TX buffer 

This will allow to set TX buffer to a minimum with no error message.
It also makes it works as in the Arduino API specification that is to return the buffer available space. In ESP32 case it will be the minmum the HW TX FIFO size of 128 bytes.

* feat: adjust availableForWrite

This change will make sure that if no TX Ringbuffer is used, it will return the UART FIFO available space. Otherwise, it will return the Ringbuffer available space, as defined in the Arduino especification.
2024-03-05 10:53:14 +02:00
Rodrigo Garcia
2fdd901639
fixes default 100ms delay with HWCDC write() is CDC is not connected (#9307)
* feat(hwcdc): fix delay

Fixes delay when CDC is disconnected. At this time is only fixes it when USB cable is unplugged.

* feat(hwcdc): fix delay

fixes delay when CDC is not connected. It was only considering when the USB cable was not plugged.

* feat(hwcdc): add 2 methods

Adds 2 new methods:
- isPlugged() will return true when USB cable is plugged, false otherwise.
- isConnected() will return true when USB CDC is connected to a application in the USB Host side and communication is stablished.

* feat(hwcdc): adjusts APIs

Fixes the example to use the new added APIs for checking if USB cable is plugged and for checking if CDC is connected.

* fixes api declaration

* fixes API declaration
2024-02-29 08:40:28 +02:00
Rodrigo Garcia
b7af090f71
Fixes the hardware cdc jtag plugged/unplugged status and related timeout/delay (#9275)
* feat(hw_cdc):fixes the hardware cdc jtag plugged/unplugged status

This will use a new IDF 5.1 feature to detect if the USB HW CDC is plugged or not. This can be checked testing HWCDCSerial.
It also fixes issues related to timeout or delays while writing to the HW Serial when USB is unplugged.

* feat(usb): Creates HWSerial_Events.ino example

* feat: adds .skip.esp32

Skips the ESP32 SoC test given that it has no USB

* feat: adds .skip.esp32s2

Skips the ESP32S2 because it has no HW CDC JTAG interface

* fix: fixes issues with Ubuntu CI 

Only compiles the example in case it is using Hardware CD and JTAG mode.

* feat(serialcdc): non block functions

modifies write and flush to do not clock in case CDC host is not connected to the CDC client from the C3/S3/C6/H2

* fix(HWCDC): changes made demands testing for CDC ON BOOT

* feat(hwcdc): Improves HWSerial_Events.ino

Improves the example by adding more information about USB being plugged and CDC being connected.

* feat(hwcdc): solves CDC connection issue

Detects correctly when CDC is or not connected. 
Deals with USB unplugged while the sketch is printing to CDD.

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Apply suggestions from code review

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-28 18:14:21 +02:00
Me No Dev
22d7fc91eb
Enable USB Serial only if selected (#9294)
* Enable USB Serial only if selected

* fix examples

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-02-27 17:32:19 +02:00
Rodrigo Garcia
f2a5041c9c
Fix(sigmaDelta): fixes sigmaDeltaAttach() when another peripheral is already attached (#9268) 2024-02-21 16:24:59 +02:00
Jan Procházka
c4b55bb9f1
feature(ledc): Add output invert option for LEDC pin + minor fixes (#9257)
* feat(ledc): Add output invert option for LEDC pin + minor fixes

* docs(ledc): Document LEDC functions in header file

* feat(ledc): Replace log2 with __builtin_ctz

* fix(ledc): Fixing free_channel for > 8 supported channels

* fix(ledc): Apply suggestions from code review

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>

* fix(ledc): Added freq check to ledcChangeFrequency

* docs(ledc): Fix ledc documentation formatting

* docs(migration): Add new functions to the migration guide

* docs(ledc): Fix functions name and parameters

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-21 16:15:06 +02:00
Rodrigo Garcia
1847723c6e
Update new RMT function rmtSetEOT(pin, EOT_Level) in the pin remap macros (#9266)
* Fix: adds RMT new function  to io_pin_remap list

* Fix: adds rmtSetEOT(int pin, uint8_t EOT_Level) to the new API list

* Fix: error in macro definition - left over from function signature
2024-02-20 15:13:42 +02:00
Rodrigo Garcia
7eb1ce89b4
Adds RMT End of Transmission Level API (#9238)
* RMT (featt):  adds a new function to set EOT level after RMT writing

* RMT (feat): adds new feature to set the EOT level after writing RMT channel

* adds return value to rmtSetEOT()

* adds bool return to rmtSetEOT()

* adds return value to the rmtSetEOT() function

* FIX (rmt): fixes eot_level setting using flags in the TX structure

* RMT(feat): Create RMT_EndOfTransmissionState.ino example

* Update cores/esp32/esp32-hal-rmt.h

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Update cores/esp32/esp32-hal-rmt.c

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Update cores/esp32/esp32-hal-rmt.c

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-02-14 15:26:51 +02:00
Theo Arends
bbbbec977a
Fix ESP32-Solo WDT on HTTP OTA update (#5426)
* Fix ESP32-Solo WDT on HTTP OTA update

* Fix ESP32-Solo WDT on HTTP OTA update

* Fix commits

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-07 15:49:01 +02:00
Me No Dev
d59efdcecd
Rework cbuf to use FreeRTOS Ringbuffer (#7860)
* Rework cbuf to use FreeRTOS Ringbuffer

* Update cbuf.cpp

* Fix typo

* Initialize with NULL

* Implement peek method

* Add initializer

---------

Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-07 15:43:06 +02:00
Rodrigo Garcia
7d595547e8
SPI (fix): Adds SPI 3 to the ESP32-S2 and adds comments about it (#9216)
* SPI (fix): Adds SPI 3 to the ESP32-S2 and adds comments about it

* SPI (fix): added a space - typo error, simple fix.
2024-02-07 14:43:54 +02:00
safocl
7966f4ae79
Fix ambiguous for TwoWire::requestFrom() methods and align API with Arduino.cc (#8817)
* Fix ambiguous for TwoWire::requestFrom() methods.

* Remove TwoWire::begin(int) overload
Inside the function, this overload truncated the data type to a shorter one. This could break some users' hopes.

* Rewrite TwoWire with using HardwareI2C
- implement proposal https://github.com/espressif/arduino-esp32/pull/8818#issuecomment-1792191815
  to bring the HARDWARE interface into compliance

* Fix TwoWire::end() return type.

* Fix TwoWire::setClock() return type.

* Fix no return statement in the TwoWire::requestFrom.

* fix(libraries/Wire): fix bad return-statement

Remove non-void values of the return-statements in function returning 'void'.

* style(libraries/Wire): replace tabs with spaces

* refactor(libraries/Wire): use slave without support
TwoWire::begin(uint8_t address) should be available without slave
support by SoC?

* refactor(libraries/Wire): remove unused variables
Compiler reports "Wire.cpp:393:15: error: variable 'err' set but not used [-Werror=unused-but-set-variable]".

* refactor(libraries/Wire): remove unused variables
Compiler reports "Wire.cpp:337:15: error: variable 'err' set but not used [-Werror=unused-but-set-variable]".

* fix(libraries/Wire): hide slave support elements
TwoWire::user_onRequest is used only in conjunction with slave support?

* refactor(libraries/Wire): remove temporary comment

* fix(libraries/Wire): restore an accidentally deleted implementation
TwoWire::endTransmission() was accidentally deleted from a cpp file.

* refactor(libraries/Wire): return return types
In TwoWire class return return types.

* fix(libraries/Wire): fix return type

* refactor(libraries/Wire): add return statement if slave isn't supported

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): fix indentation

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): fix indentation

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): fix indentation

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): remove unnecessary empty lines

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-01-31 12:50:35 +02:00
Jan Procházka
23c6779d87
fix(i2c): Moved i2c pins out of CONFIG_DISABLE_HAL_LOCKS (#9164) 2024-01-23 14:10:43 +02:00
Sly Gryphon
dd712db323
fix(ledc): Add missing include for SemaphoreHandle_t (#9133) (#9134) 2024-01-19 17:23:56 +02:00
Stefan Oberhumer
9aae6f5ec2
change(MD5Builder): Const-correctness. (#9104)
* change(HashBuilder): Const-correctness

Propagate 'const' of buffer variable from underlying functions.

* Remove char* methods

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-01-19 17:21:50 +02:00
Jan Procházka
2e5c932aeb
SPI - Allow detaching of some SPI pins without stopping SPI (#9117)
* feature(spi): Allow detach of some SPI pins

* fix(spi): Remove unnecessary check

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* feat(spi): Rename CS pin to SS to match Arduino standard

* fix(spi): Remove unnecessary checks

* remove lock from spiAttackMISO

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: me-no-dev <hristo@espressif.com>
2024-01-19 17:21:19 +02:00
Rodrigo Garcia
60395ed6e7
UART: fixes begin() after a previous begin() :: deleting previous RX/TX buffers and its data (#9095)
* UART: fixes begin()

* Typo: fixes typos and some testing left over

* feat: fixes end()

* feat: adjust internal baurate

* feat: Changes CI [HardwareSerial]

 [HardwareSerial]: Changes CI to match new HardwareSerial begin() and end()

* feat: fixes auto_baudrate_test

[uart]: fixes end(void) instead of end(bool)

* feat: adjust copyright year

[fix]: adjust commentary of the copyright year
2024-01-16 15:56:57 +02:00
Dirk-Willem van Gulik
e581717bf3
Web server simplifications and handers (#7429)
* First stab ad simplyfing webserver auth and adding a handler.

* Tweaks after testing against docs and latest Library tree

* Add documentatin for callback handler

* Bodge to allow things to compile without the dependencies

* Remove dependency on sodium to make it compile with 4.4

* Fix hex conversion

* Move some common HEX functions into a static HEX class, remove those from MD5 and add some examples. This allows for the cleanup of various to/from HEX routines elsewhere.

* Remove some duplicated code

* Add simplfiied HEXBuilder under MD5Bulder to CMakefile.

* Update for 3.0.0 and QoL improvements

* Remove examples that depend on external libraries

* Skip H2 testing

* Formatting improvements

* Move builders examples to Utilities folder

* Fix indentation

* Add HashBuilder abstract class

* Add SHA1Builder

* Fix comment

* Fix whitespace

* Fix crashes and improve log messages

* Fix indentation for webserver

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-01-16 15:49:46 +02:00
Me No Dev
768719c68f
This is a continuation on the topic of adding IPv6 Support to ESP32 Arduino (#9016)
* IPv6 for Arduino 3.0.0

* Fix warning in WifiUdp

* remove comment / formating

* Add zone to IPAddress and update WiFiUDP and WiFiGeneric

* Add from ip_addr_t conversion and better toString implementation

* Use constant for IPAddress offset

@sgryphon is this better?

* Combine hostByName to support both IPv6 and IPv4 results

* implement logic to use v6 dns only when global v6 address is assigned and remove IPv6Address

* Rename softAPenableIPv6

* Rename mDNS methods

* fix IPAddress method to work with const address

* Some cleanup and do not print zone in IPAddress

* rename WiFiMulti method

* Fix AP DHCPS not properly working on recent IDF

* Add option to print the zone at the end of IPv6

@TD-er

* remove log prints from hostByName

* Use correct array length for listing IPv6 addresses

* Implement some Tasmota requirements

Added constructor that takes `const ip_addr_t *`.
Added `addr_type()` getter
Organize header to highlight the Espressif additions to IPAddress

* add 'const' to IPAddress::addr_type()

* Fix WiFiUdp not updating mapped v4 address

* Update WiFiServer.cpp

---------

Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2024-01-15 15:24:34 +02:00
TANAKA Masayuki
c1a4055869
change(esp32): Added clearing of queue with unTone() (#9055)
unTone() does not stop until the queue is exhausted. Therefore, we added clearing the queue.
2024-01-08 14:59:58 +02:00
Jan Procházka
8a1e4638f7
LEDC - Allow custom channel selection (#9031)
* feat(ledc): Allow custom channel selection

* fix(ledc): Fix check of maximum channel

* docs(ledc): Add ledcAttachChannel to docs

* feat(ledc): Change channel to uint8_t + add log message
2024-01-08 14:36:56 +02:00
Rodrigo Garcia
73dd8a29a3
Fixes EspClass::deepSleep(64 bits) (#9077)
* Fixes EspClass::deepSleep(64 bits)

This will change time in microseconds from 32 bits to 64 bits as defined in IDF.

* updates function declaration
2024-01-08 14:00:04 +02:00