Defines the standard LED_BUILTIN and RGB_BUILTIN macros for the Waveshare ESP32-S3 Zero, allowing its onboard WS2812 RGB LED to be controlled via standard Arduino APIs.
This PR enhances the Wire library to support std::function–based callbacks for I2C slave mode, enabling the use of lambdas and captured contexts.
- Replaces raw function pointers in TwoWire and HardwareI2C with std::function for onRequest and onReceive
- Updates constructors, method signatures, and default initializations to use std::function
- Adds new example sketch, CI config, and documentation updates demonstrating the functional callback API
This PR removes WiFi provisioning support from CI and examples (shifting to Thread/BLE provisioning), updates the CI configs for all Matter examples to drop the WiFi requirement, and adds new API keywords and a fresh “LambdaSingleCallbackManyEPs” example.
- Deleted the WiFiProvWithinMatter example (its .ino and ci.json) since BLE is now used for provisioning.
- Stripped "CONFIG_SOC_WIFI_SUPPORTED=y" from the CI JSON of existing examples to test Thread-only builds.
- Updated keywords.txt with new Matter API identifiers and introduced a new “LambdaSingleCallbackManyEPs” example with CI and source
* feat(i2c): Add method to access the I2C bus handle
* feat(wire): Add access method to get the I2C bus number
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Updated Pins of Devkits
Deleted soc_caps.h library and related commands at Deneyap Kart 1A v2, Deneyap Kart 1A, Deneyap Mini and Deneyap Mini v2.
Added TX1 and RX1 pins and updated LED pin definition at all Devkits.
Added BOOT (BT) pins at Deneyap Kart, Deneyap Kart 1A, Deneyap Mini and Deneyap Kart G.
Changed D0 and D1 pin numbers at Deneyap Kart G.
Changed D12, D13, D14, D15, PWM0 and PWM1 pin numbers at Deneyap Kart 1A v2.
Added A8, T0, T1, T2, T3, T4, T5, T6, T7, T8, D16, D17, D18, D19, PWM2, PWM3, PWM4 and BAT pin numbers at Deneyap Kart 1A v2.
Changed A2, A3, A4 (T0) and A5 (T1) pin numbers at Deneyap Kart and Deneyap Kart 1A.
Renamed DA2 (DAC2) pin as DA0 (DAC0) and changed DAC1 and DAC2 pin numbers at Deneyap Mini and Deneyap Mini v2.
* Updated board.txt of all Devkits
Updated board.txt of all Devkits
* Remove Repeating Pin Definition
Remove Repeating Pin Definition
* Fix Pin Definition
Remove repeating pin definitions of SPI, I2C and DAC.
Update RGB LED definition for using digitalWrite() command with RGB LED.
* Remove Repeating Pin Definitions
Remove repeating pin definitions of LEDB, SPI, I2C and DAC.
* Update RGB LED definition
Update RGB LED definition for using digitalWrite() command with RGB LED.
* Fix broken links for external library test
Fix broken links for external library test
* Update UploadMode Config of Deneyap Kart 1A v2
Update UploadMode Config of Deneyap Kart 1A v2
* Add Deneyap Kart v2
Add pin definitions and configs of Deneyap Kart v2.
* Update UploadMode config
Hardware CDC is default now.
* Fixed typo fault
Fixed typo fault
* Fixed build.board parameter
Fixed build.board parameter
* Removed unsupported Flash sizes and RAM type
Removed unsupported Flash sizes and RAM type from menu.
* Remove unsupported partition options
Remove unsupported partition options
* Fixed Annotations and Space
* Update pins_arduino.h
* Clamp Zigbee color saturation to 0-254
* Clamp hue to 0-254 for Zigbee color lights
* Use std::min instead of ternary operator
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(rak3112): add pins_arduino.h for RAKWireless RAK3112 module
* feat(rak3112): update pins_arduino.h to define LED pins and update board.txt
* Delete the redundant configuration information in board.txt
* Restore the incorrect modifications to board.txt
* Delete blank lines
* Move the rak configuration information to the end of the boards.txt .
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Daniel.Cao <daniel.cao@rakwireless.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* fix(example): led flash not working if not using default model in camera example
fix(example): add camera_config.h and enable LED FLASH based on board model
fix(example): Remove face detection description as no longer supported
* fix(example): add header guard for board_config.h
* fix(csrf): Fix SCRF vulnerability in WebUpdate.ino
* fix(csrf): Prevent CSRF on other OTA examples
* fix(csrf): Require auth user and pass to be changed
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(p4): Add method to set the pins for SDIO to WiFi chip
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(variant): add KodeDot ESP32-S3 board with QSPI LCD, SD and GPIO header
* fix(kodedot): Reorder board definitions and translate comments to English
* fix(kodedot): Clean up OTA override and remove unused partition menu for kode dot
* fix(kodedot): Build board changed from ESP32S3_DEV to KODE_DOT on kode dot board
* ci(pre-commit): Fix whitespace, EOLs and codespell 'Analog'
* ci(pre-commit): Add bash script formatter
* fix(merge): New name and description for custom merge tool and change partitions table to variants folder
* feat(test): Enhance NVS test
* fix(nvs): Remove unused Unity header and improve Serial wait loop
* refactor(nvs): Extract string increment logic into a separate function
* refactor(test): Format long strings in expect_exact calls for better readability
* feat(SDFS): Add destructor to clean up resources
* feat(test): Enhance NVS test
* fix(nvs): Remove unused Unity header and improve Serial wait loop
* refactor(nvs): Extract string increment logic into a separate function
* refactor(test): Format long strings in expect_exact calls for better readability
* feat(uart): fixes loopback function after IDF changes
IDF 5.4.1 has added a new function called uart_release_pin() that is called whenever new pins are set or when uart driver is deleted.
This has a side effect that causes RX pin to never work again with the loopback function. Other changes also have removed some GPIO setup that was necessary for the GPIO loopback mode work.
The PR forces a full RX Pin setup in order to make it work in GPIO Matrix with Loopback TX Signal
* feat(uart): adds missing include file
* feat(uart): removes not necessary part of the code
* fix(uart): commentaries style fix
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Proper EDNS handling and cleaner NOERROR response
* fix: library.properties
reverting version number update - as it is done automatically
* ci(pre-commit): Apply automatic fixes
* Spelling Corrected and minor clarification in comments
* Removing commented out code fragments
* ci(pre-commit): Apply automatic fixes
* fix(pr): Fix typo
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* made some fix to the ESP32 I2S simple tone example
* edit the I2S - simple tone example
* edit the I2S - simple tone example
* some edit
* edit comment
* edit
* edit
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(release): Replace all assets with chinese mirrors
* feat(release): Add script to append "-cn" to versions
* docs(install): Add instructions for users in China
AsyncUDP::listenMulticast() properly receives packets sent to IPv4
multicast addresses like 239.1.2.3, but it is not receiving packets sent
to IPv6 multicast addresses like ff12::6ood:cafe.
The root cause is a bit hidden: listen(NULL, port) would match
AsyncUDP::listen(const ip_addr_t *addr, uint16_t port), which calls
_udp_bind(_pcb, addr, port), which uses the lwIP API to call
udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) at
the end. If lwIP has LWIP_IPV4 enabled, it checks if ipaddr == NULL and
sets it to IP4_ADDR_ANY. So an IPv6 address is never bound.
This fix checks the IP address passed to AsyncUDP::listenMulticast(). If
it is an IPv6 address, it constructs and passes the IPv6 any address
(::); otherwise (IPv4), it constructs and passes the IPv4 any address
(0.0.0.0).
* feat(zigbee): Support min max for Analog EP
* feat(zigbee): Use cfloat FLT_MAX
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(ap): Add support for DHCP Captive Portal (opt 114)
* feat(ap): No need to guard the function
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
HTTP 204 is a successful return code which indicates No Content. While it's appropriate to return a 304 if the server has content for a device but it hasn't change, it is more accurate for a server to return a 204 if it simply doesn't have any firmware files for a particular device.
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* feat(zigbee): Add AC DC ElectricalMeasurement support
* ci(pre-commit): Apply automatic fixes
* ci(): fix precommit codespell
* ci(pre-commit): Add spaces between numbers and units
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* feat(esp32): Zigbee power outlet example
Zigbee power outlet example
* feat(esp32): Zigbee power outlet example
Change username
* feat(esp32): Zigbee power outlet example
Remove old comment
* fix(zigbee): fix power outlet compile errors and update example
* fix(example): Update readme
* fix(example): Update ci json file
* ci(pre-commit): Apply automatic fixes
* fix(): precommit codespell
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Added new Unexpected Maker SQUiXL and EDGES3[D] boards.
Signed-off-by: Seon Rozenblum <seonr@3sprockets.com>
* Seems we are being picky about board names now ;)
Signed-off-by: Seon Rozenblum <seonr@3sprockets.com>
* Seems I have to have SPI pins defined for SQUiXL, or compiling breaks
Signed-off-by: Seon Rozenblum <seon@unexpectedmaker.com>
---------
Signed-off-by: Seon Rozenblum <seonr@3sprockets.com>
Signed-off-by: Seon Rozenblum <seon@unexpectedmaker.com>
* feat(uart): simplifies UART example based on MODBUS standard
* fix(uart): fixes a uart example typo
* feat(uart): replaces UART0 by Serial0 in the code
* ci(pre-commit): Apply automatic fixes
* fix(uart): typo error message in commentary
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Commit 0773dd7619 from PR #10841 broke pin
remapping by moving its application too early in the definition process.
This commit restores the original order of includes, ensuring that pin
remapping is applied correctly.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
* Add files via upload
* Add files via upload
* Update SPI.h
* Update esp32-hal-spi.c
renamed invert_out to ss_invert to be more intuitive
* Update esp32-hal-spi.h
Removed the out from the function name spiSSInvertout.
* Update SPI.cpp
Removed the out from the function name spiSSInvertout.
* Update cores/esp32/esp32-hal-spi.c
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* ci(idf): Use included IDF examples in CI
* fix(example): sets Matter version to be 1.3 or higher
* feat(matter): sets c++ 2a as default
* feat(matter): Update README.md
* fix(matter): instructions about using more than one sdkconfig file
---------
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
* feat(logging): Arduino log redirection
* fix(uart): log will only use ets_printf() for uart and cdc
* feat(uart_cdc): when CDC is logging, UART is silent
* feat(uart_cdc): when CDC is logging, UART is silent
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(board): Alfredo NoU3 include stdint.h
* fix(hal_gpio): lets pins_arduino.h to use stdint and stdbool types
* feat(pins_arduino): fixes lack of stdint in the right place
* fix(pins_arduino): reverts all changes to this file
* fix(pins_arduino): reverts all changes to this file
* fix(pins_arduino): reverts all changes back to original pr
---------
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
* Add an option to force IDF's default UART clock source
* feat(uart): adds function to set clock source
* feat(uart): add uart clock source selection method
* feat(uart): add uart hall function to set the uart clock source
* feat(uart): add function to set the uart clock source
* feat(uart): set clock source as necessary
* fix(uart): missing class qualifier declaration
* fix(uart): fixing a typo and non LP UART SoC clk src setting
* fix(uart): variable name, typo error
* fix(uart): retores previous identation reducing diff load
* feat(uart): apply CONFIG_ARDUINO_SERIAL_FORCE_IDF_DEFAULT_CLOCK_SOURCE to LP UART
* feat(uart): adds option for UART_CLK_SRC_DEFAULT
* feat(uart): adds option for setting default uart clock source from IDF
* feat(uart): documents UART_CLK_SRC_DEFAULT as option in header file
* feat(uart): documents using the IDF default uart clock source
* fix(uart): type missmatch may cause error
* fix(uart): type missmatch may cause error, test for -1
* feat(uart): considering both HP and LP default uart clock source
* feat(uart): improve the defined value for UART_CLK_SRC_DEFAULT
* fix(uart): using uart_sclk_t as hal level parameter
* feat(uart): apply default LP uart clock source
* fix(uart): considers that it may set the LP UART as well
* feat(uart): using UART SCLK enum for uart clock source values
* fix(uart): using UART_CLK_SRC_RTC now
* fix(uart): documentation using UART_CLK_SRC_RTC now
* fix(uart): fix old commentary that is not correct anymore
* fix(uart): wrong identation in code line
* fix(uart): using uart number as argument instead
* fix(uart): using uart number as argument in setClockSource()
* fix(uart): using uart number as parameter in uartSetClockSource()
* feat(uart): update Kconfig.projbuild to reflect functionality
* feat(uart): removing Kconfig.projbuild option to force default clk src
* feat(uart): removes kconfig option to force uart default clk src
* fix(uart): replacing #if #endif by #if #elif #endif for the same enum
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(zigbeeEP): review of names and memory allocation
* fix(zigbeeEP): destructor shall free any allocated memory
* fix(zigbee_ep): forgotten var name change
* feat(zigbee_ep): use static heap memory for manufacturer and model names
* feat(zigbee_ep): changed model and manufacturer to heap
* feat(zigbee_ep): use static heap memory allocation
* fix(zigbee_ep): using stack only for adding attribute
* feat(zigbee_ep): reverting back read data type
* fix(zigbee_ep): rooling back to use malloc for remote attr reading
* feat(zigbee_ep): check malloc return for null
* fix(zigbee_ep): replace nullptr by NULL after C malloc()
* ci(pre-commit): Apply automatic fixes
* fix(zigbee_ep): fix variable scope
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(zigbee_ep): fix variable scope
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat(zigbee): Add checks on setting attrs and commands
* feat(zigbee): Add error info in the logs
* fix(zigbee): Fix memory leak, print esp_zb_zcl_status_t error, remove analogValue from analog EP
* feat(example): Update factoryResetoption in sleepy example
* fix(zigbee): Add error checks to Illuminance EP
* fix(zigbee): Return false on first error hit
* fix(zigbee): Apply same formatting on all returns
* fix(zigbee): Add check when adding a OTA cluster
* fix(zigbee): release locks before returning
* fix(zigbee): use correct return in doorWindowHandle
* fix/zigbee): Add missing return in WindowCovering
* fix(zigbee): Added a note of future task
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix: BLEAdvertising methods return error codes
Some methods returned void even if they could produce an error, in which case they failed silently. They now return the corresponding error code.
* fix: methods which could error out return bool
Changed from returning esp_error_t, in order to be more arduino compatible.
---------
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
* fix(eth): Set the ETH properties at the correct time
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Fix(esp32s3usbotg) stdbool dependency in pins_arduino.h
* fix(board): Remove comment in pins_arduino.h
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* Add a Default 32MB partition
This is a complementary addition to use 32MB boards in PlatformIO like the ESP32-S3-DevKitC-1-N32R8V.
* Edited Board file
Added partition "default_32MB" to the menu
* Delete tools/boards.txt
* Edited boards.txt
Added the "default_32MB" partition to the menu
* feat(boards): adds app13M_data7M_32MB to s3 octal
* fix(board): format linux new line
* fix(boards): trying to make it \n and not \r\n
* add change to esp32s3-octal board too
This reverts commit 3afddfc2ce5281d8cd0344bc91665665d4179040, reversing
changes made to a9f64003bad5a2dcc1bd7f66e8494c9f8c8dd2e2.
* fix(boards): setting eol as /n
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(rmt): Fixed protocol name in RMTReadXJT examples
I couldn't find a protocol called D12.
I found LR12 so I'll fix that.
* feat(RMT): changing example commentary to reflect D16 protocol
---------
Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
* feat(wifi): Add support for 2.4GHz and 5GHz band switching
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(uart): adds a function to calculate maximum valid rx timeout
* fix(uart): check uart rx timeout value and log an error msg
* fix(uart): changes log message to a more clear one
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(zigbee): Save network channel after 1st joining for faster rejoin
* ci(pre-commit): Apply automatic fixes
* feat(zigbee): Add channel mask reset after timeout
* feat(zigbee): Add the resetChannelMask to all Begin methods
* feaz(zigbee): Move function to private and add set method
* fix(example): Remove test from device mode name
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(uart): uart begin does not set the clock source when baudrate changes
* fix(uart): returns success on baud rate change operation
* fix(code): uart typo - missing ( in the code
* fix(uart): replacing mutex lock to avoid double lock
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(uart): ci uart test fail on esp32s2 after uart break
* fix(uart): ci error with change pins test on ESP32
* fix(uart): ci test with perimgr using esp32 fails
* feat(uart): avoid electrical noise before setting pins
* fix(uart_ci): fixes the UART CI sketch due to IDF 5.3 pull up change
* fix(uart_ci): keeping previous formatting and applying changes
* feat(uart_ci): trick for passing esp32 wokwi ci test
Wokwi ESP32 fails with the pinMode() in line 56|58
Real device with Arduino Core 3.1.2 and 3.2 needs it to fix the issue.
This patch will skip the pinMode() when compiling with Wokwi and make it pass the CI test case.
* feat(uart_ci): reverting the wokwi patch, once it didn't make any difference
* fix(wokwi): Change CPU freq to 80
* fix(wokwi): Change CPU freq to 120
* ci(pre-commit): Apply automatic fixes
* fix(uart_ci): fixes a couple typos in commentatries
---------
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: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* test(i2c): Do not use delta as Wokwi timing can be inconsistent
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(matter): itshall set digital mode before digitalWrite
* fix(matter): example must set pin in digital mode before writting
* fix(matter): example shall set digital mode before writing
* fix(matter): digitalMode necessary before digitalWrite(LOW)
* fix(matter): example must set digital mode after analogwrite
* fix(matter): wrong copy paste
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(wifi): Disable properly LR mode if it was enabled before
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(gpio): allows mixing digital and analog read/write operations
* fix(gpio): simple mistake in calling __pinMode() fnuction
* fix(gpio): simple mistake in calling __pinMode() fnuction
* feat(gpio): update the log message to tell the solution for the error.
* feat(gpio): warn user about digitalRead() used with non GPIO pin
* fix(gpio): wrong peripheral manager test case
* ci(zigbee): Check if Zigbee is enabled for CI tests
* ci(zigbee): Fix requirements
* fix(zigbee): Use LED_BUILTIN for range extender
* fix(zigbee): Use default GPIO if LED_BUILTINnot defined
* IDF release/v5.4 bcb3c32d
* fix(zigbee): Remove the need of native ieee802154 radio
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* feat(uart): adds low power uart peripheral into hardware serial class
* feat(lp_uart): pin setting for lp uart plus esp32p4 fixes
* fix(uart): keeps the test as it was before.
* fix(uart): updates the copyright year reference
* fix(uart): updates the copyright year reference
* feat(lp_uart): supports any number of lp uart port for the future
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(i2c): Add support for the new I2C driver in IDF v5.4
* fix(build): Add the new driver to CMakeLists.txt
* fix(i2c): Guard sleep retention
Not all chips can restore I2C bus after light sleep
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Fixes: #10938
Keep allocated memory when rhs fits
Use case: Appending to a String with pre-allocated memory (e.g. from `reserve()`)
No need to move 0-termination char in String::move
Simplify calls to String::copy
A lot of the same checks were done before calling `copy()` which should be done in the `copy()` function itself.
String::copy() Should not copy more than given length
Fix potential out of range in String::concat
There is no prerequisite the given array has to be a 0-terminated char array.
So we should only copy the length that has been given.
The `setLen()` function will make sure the internal string is 0-terminated.
So no need to dangerously assume there will be 1 more byte to copy
Allow String::concat(const String &s) with s.buffer() == nullptr
When constructing a String object, the internal buffer is a nullptr.
However concatenating this to another String would return `false` while this is perfectly fine to do.
* feat(zigbee): Support HSV color commands
* ci(pre-commit): Apply automatic fixes
* feat(zigbee): Add hue and sat attributes and update color capabilities
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(zigbee): Add OTA client cluster support
* feat(zigbee): Add conditions to reject OTA upgrade
* feat(zigbee): Add newest version of OTA handler
* fix(zigbee): Fix errors and warnings, swap parameters order
* feat(zigbee): Add simple OTA Client example
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(cdc): Add support for two CDC ports at once
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(logging): Corrected FPS calculation
Previously, last_frame was only updated once at the beginning of stream_handler,
leading to incorrect FPS and avg_frame_time computation.
This commit ensures last_frame is updated on each iteration after last FPS computation,
resulting in accurate FPS logging.
Fixes#10920
* Revert "fix(logging): Corrected FPS calculation"
This reverts commit 0bb7b9555e7661c72dc3376cf8a001c6fd3758c8.
* fix(loggin): Incorrect FPS computation fixed
Corrected and tested change in FPS computation, suggested by @me-no-dev and found working with correct numbers.
Previously, last_frame was only updated once at the beginning of stream_handler,
leading to incorrect FPS and avg_frame_time computation.
This commit ensures last_frame is updated on each iteration after last FPS computation,
resulting in accurate FPS logging.
Fixes#10920
* fix(i2s): Check if pin is used before clearing bus
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(zigbee): Add 2MB partition scheme for ED
* fix(example): Check if readings are not null
* fix(zigbee): Add a 10s timeout for temp sensor settings read
* fix(example): Remove duplicated read
* fix(zigbee): Check if device is not bound before bounding again
* fix(zigbee): Revert zigbee partitions name
* fix(zigbee): Fix warnings of missing initializer for member
* fix(zigbee): Fix typo in the comment
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Add method for querying service name
* Added implementation for getting service name
* Update mDNS-SD_Extended example to include service name
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(platform): Improve firmware size calculation
It will still have a couple of hundred of bytes difference
* fix(build): Change partition used for UploadHugeFile
* feat(matter): add new matter endpoint for thermostat
* fix(matter): not used variable from log_e() message
* feat(matter): adds specifc type name for thermostat auto mode enabled
* fix(matter): suggested changes in pr review
* feat(matter): added the whole list of thermostat operational modes
* fix(matter): fixed type in thermostat operational modes
* ci(pre-commit): Apply automatic fixes
* fix(matter): typos caught by CI codespell
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Tested on some of the popular S3 board bought from Amazon, the digitalRead of an INPUT pin is LOW, which stops the timer right after start.
Setting it to INPUT_PULLUP will fix it.
Before, the raw read would time out if the content length was not a multiple
of HTTP_RAW_BUFLEN, as it tried to read HTTP_RAW_BUFLEN bytes even if the
last chunk should actually contain less.
* feat(chip): Add definition for BOOT_PIN for all chips
For use in sketches as default button
* fix(core): Make BOOT_PIN static
* fix(hal): BOOT_PIN should always be defined
* feat(matter): adds new temperature sensor matter endpoint
* feat(matter): commentaries review and fixes
* feat(matter): commentaries review and fixes
* feat(matter): commentaries review and fixes
* feat(matter): commentaries review and fixes
* feat(matter): commentaries review and fixes
* feat(matter): commentaries review and fixes
* feat(matter): general commentaries and code review
* feat(matter): keeping arduino style for local variables (lower case)
* feat(matter): applies a generic temperature unit to the implementation and example
* fix(matter): fixed problem with begin(float) implementation
* fix(matter): fixed begin(float) initiallization
* feat(matter): updated matter temperature keywords with new api
* ci(pre-commit): Apply automatic fixes
* fix(matter): fixed code spell ci errors in matter temperature sensor
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* refactor(uart): Refactor UART test to work with any number of UARTs
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* fix(uart): Set CPU freq on ESP32
* ci(pre-commit): Apply automatic fixes
* fix(spelling): Fix codespell error
---------
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>
* BLECharacteristic::notify() optimization
GeneralUtils::hexDump() doesn't output anything if the log level is not "VERBOSE". Additionally, it is very CPU intensive, even when it doesn't output anything. So it is much better to *not* call it at all if not needed.
In a simple program which calls BLECharacteristic::notify() every 50 ms, the performance gain of this little optimization is 37% in release mode (-O3) and 57% in debug mode.
Of course, the "#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE" guard could also be put inside the GeneralUtils::hexDump() function itself. But it's better to put it here also, as it is clearer (indicating a verbose log thing) and it allows to remove the "m_value.getValue().c_str()" call, which is in itself quite CPU intensive.
* BLECharacteristic optimization
Calls to BLEUtils::buildHexData() don't output anything when the log level is not "VERBOSE" or "DEBUG". As this function is quite CPU intensive, it is better to not call it when not needed.
* feat(matter): adds new matter generic switch endpoint
* fix(matter): no need of arduino preferences here
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(asyncudp): add all current keywords to the list
* feat(asyncudp): add license information to the source code
* feat(asyncudp): add license information to the source code
* feat(asyncudp): add license information to the source code
* feat(asyncudp): add license information to the source code
* feat(asyncudp): add license information to the source code
* feat(asyncudp): revert license information to the source code
* feat(asyncudp): revert license information to the source code
* feat(asyncudp): revert license information to the source code
* feat(asyncudp): revert license information to the source code
* feat(asyncudp): revert license information to the source code
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(zigbee): Add connected and minor fixes, example update
* fix(example): Use correct API call for connected
* fix(zigbee): Increase timeout and add semaphore to begin
* feat(zigbee): Add option to select debug libs for zigbee
* fix(example): fix warning by double percentage symbol
* fix(example): Fix serial prints for Windows os
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* ci(pre-commit): Apply automatic fixes
* fix(example): Fix precommit spelling
---------
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>
* feat(matter): add new endpoint - color temperature light
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(matter): adjust preferences labels in matter examples
* feat(matter): adjust preferences labels in matter examples
* fix(matter_example): extra blank space in code added by mistake
* feat(matter_example): use const char * instead of #define
* feat(matter_example): use const char * instead of #define
* feat(matter_example): change Preferences names
* fix(matter_example): missing semicolon in code
* fix(zigbee): Bump zigbee version and use 1.6.0 (#10563)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* fix(zigbee): Add require public for zigbee libs
* fix(zigbee): Guard the Zigbee library
* fix(zigbee): Fix removed cluster_role attribute (#10576)
* fix(hosted): Update hosted configuration
* fix(hosted): Fix Hosted deinit and protect reinit for now
* IDF release/v5.3 a0f798cf
* IDF release/v5.3 a0f798cf
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* fix(build): Allow Arduino to compile in IDF without components
This adds guards for the rest of the extra components
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(wifi): Fix requirements and guards for hosted Wi-Fi
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* feat(matter): source code folder organization
* feat(matter): new matter endpoint dimmable light
* feat(matter): dimmable friend class and adjusts log levels
* feat(matter): adds new folder and source code to cmakelists.txt
* fix(matter): identation in cmakelists.txt
* feat(matter): adds license disclaimer to all source code
* feat(matter): example code simplification
* feat(matter): make it work with rgb and analog led
* feat(matter): single user callback based on lambda function
* feat(matter): commentaries and code improvement. update() and callbacks added.
* feat(matter): adde new keywords to arduino settings
* feat(matter): example code adjustment to use improved api
* fix(matter): it shuold work even when no callback is set
* feat(matter): matter.h includes all possible endpoint header files
* feat(matter): adjusts all examples to only include matter.h
* fix(matter): double declaration of ret - var scope issue
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* IPv6 restore zone id
This PR restores the IPv6 zone-id in String representation of IPv6 address as well as parsing. This follows 20a28b58bc that disabled it due to a crash in `netif_index_to_name()`.
The fixed code scans through `netif_list` to find the `netif` name and id.
Note: zone-id are incremented by 1 compared to `netif` id.
For example internal zoneid value `3` actually translates to `%st2`
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(get.py): Check if win32 tools also exist when running on win64
* change(tools): Push generated binaries to PR
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add files via upload
* Add files via upload
* feat(boards): add Waveshare ESP32-S3-Touch-AMOLED boards
Added three micro snow development boards to boards
* feat(boards): add Waveshare ESP32-S3-Touch-AMOLED variants
A trio of micro-snow variants have been added to the variants
* Delete variants/waveshare_esp32_s3_touch_amoled_143/pins_arduino.h
* Delete variants/waveshare_esp32_s3_touch_amoled_164 directory
* Delete variants/waveshare_esp32_s3_touch_amoled_191 directory
* feat(boards): Three variants of the development board were added
waveshare_esp32_s3_touch_amoled_143 waveshare_esp32_s3_touch_amoled_164 waveshare_esp32_s3_touch_amoled_191
* feat(boards): Add three boards to boards
* feat(boards): Add the variants
* feat(boards): Fixed the boards file
To ensure that each plate type only one
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(bm): Board Manager install will fail on Windows
On some Windows installations, Board Manager will fail to install the RC2 core, because it could not find esptool for the given OS.
* fix(package): EspTool for Mac is only ARM64 version
cc: @lucasssvaz
* feat(uart): allow pins_arduino.h to define esp32-p4 uart pins
ESP32-P4 has UART default pins only for UART0 and UART1.
This PR allows the board definition from pins_arduino.h to define RX2 ... RX4 and TX2 ... TX4 if necessary.
It also solves the issue of begin(baud) with no pins for UART2...4 by just sending a error message and returning.
* feat(uart): removes the uart2 pin definitions - not existant
* fix(uart): solves the case when uart has already been initialized
* ci(pre-commit): Apply automatic fixes
* fix(ci): uart definition for esp32-p4 uart2 rx,tx pins
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* lib Network: add cpp syntax to structs
* [Network] deprecate NetworkEvents::removeEvent() for std::function callbacks
removing event callback via std::function pointer does not work as expected for lambdas (issue #10365)
here mark NetworkEvents::removeEvent(NetworkEventFuncCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX)
as deprecated in favor of removing by callback's id
for NetworkEvents::onEvent remove checking for dublicate event handler, this does not work for lambdas too
remove NetworkEvents::find methods as unnecessary
move cbEventList container inside the class
declare NetworkEventCbList_t as a cpp struct with constructor, allows using std::vector.emplace() when adding new items to container
optimize NetworkEvents::remove() calls to use erase-remove idiom for std::vector
* [Network] hide event task under private member of NetworkEvents class
prevent checkForEvent loop to be callable from outside the task's thread
* refactor(NetworkEvents) code polishing and comments
- rename NetworkEvents::cbEventList as private member NetworkEvents_cbEventList
- NetworkEvents::getStatusBits() add const qualifier
- turn statics into constexpr
- add indexes to enum::arduino_event_id_t to make events indexing consistent for SOCs with/without WiFi
also leave some index gaps to minimize renumbering on adding new events
- add doxygen help to NetworkEvents:: methods
- declare NetworkEvents::eventName() as static, that could be used without creating class scope
- potential mem leak in postEvent
* refactor(NetworkEvents) add (optional) mutex lock for container operations
provide thread safety for dual core SoCs
since std::mutex brings additional componetns of libstdc++ lib it impacts resulting image size significantly (around 50k)
Might be enabled on-demand if thread-safety is required
* ci(pre-commit): Apply automatic fixes
* fix(spelling): Fix spelling mistakes
---------
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>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* User can choose if calc MD5 from decrypted file
At the present moment, if user want use OTA, the function calculate MD5 of the decrypted file, but if file is encrypted from source, could be more useful to know the MD5 of the encrypted file.
* md5
* Update Updater.cpp
* Update libraries/Update/src/Update.h
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/Update/src/Update.h
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/Update/src/Updater.cpp
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/Update/src/Updater.cpp
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Delete boards.txt
Delete old files
* Add files via upload
Add new board
* Add files via upload
Add new board
* Delete boards.txt
Delete old files, modify the definition of the case error
* Add files via upload
Modify the definition of the case error
* ci(pre-commit): Apply automatic fixes
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* fix(tests): Add CMakeLists file to compilation tests
* fix(tests): Add variant files that are used in compilation
* fix(c2): Move C2 as it is only tested as component
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* feat(matter): initial commit with arduino matter lib
* feat(matter): add matter library to cmakelists.txt
* fix(matter): add correct guard for ci
* fix(matter): using correct ci requirements in ci.json
* fix(matter): using correct ci requirements in header files
* fix(matter): using correct ci requirements header and examples
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(commentary): longer explanation
* feat(matter): api simplification with begin
* feat(matter): testing flashmode=qio in CI
* feat(matter): testing flashmode=qio in CI
* fix(matter): changes CI FQBN
* fix(matte): include all fqbn in ci.json using qio
* fix(matter): revert ci and guard changes
* fix(matter): typo and commentaties
* feat(matter): adds a light toggle switch button
* feat(matter): improved the button control
* feat(matter): using switch instead of if() for attibute change
* fix(matter): switch/case scope
* fix(matter): problems found after pressing reset
* feat(matter): improve example using preferences
* fix(pre-commit): Fix and apply pre-commit hooks
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* fix(tests): Add missing newlines to output
* fix(tests): Improve fibonacci test
* fix(tests): Remove redundant targets from json
* fix(wokwi): Checkout proper base branch for wokwi tests
* feat(logging): Add logging to some tests to improve debugging
* fix(ci): Make CI more permissive and improve messages
* fix(tests): Bump pytest-embedded version to support P4
* feat(sdmmc): Add support for P4
* fix(board): Remove builtin led
* Update libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino
Add missing note about power pin for P4
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* ci(pre-commit): Apply automatic fixes
* feat(sdmmc): Option to set power channel
* feat(sdmmc): Update pins_arduino.h
* feat(sdmmc): remove sdmmc power from periman
* fix(sdmmc): use corrent variable
* fix(sdmmc): Remove periman
* feat(sdmmc): Toggle power pin if defined
* feat(sdmmc): setPowerChannel available only when supported
* feat(sdmmc): Toggle sd power pin for 200ms
* fix(example): Remove p4 pins as they are listed already
* feat(sdmmc): Check if power channel is specified
* ci(pre-commit): Apply automatic fixes
* fix(ci): codespell fix
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(touch): Support NG touch driver for P4
* fix(ci): Touch test + IDF compilation fixes
* fix(ci): remove debug prints from touch test
* fix(ci): Fix touch test for esp32
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* ci(FQBN): Use QIO as default as DIO can be used on demand now
* fix(indentation): Fix default indentation for bash files
* fix(compilation): Make errors appear on CI fail
* ci(json): Add requires_any field to JSON and fix comparison
* fix(eth): Add ETH support for ESP32-P4
Also adds configuration to pins_arduino.h
* fix(eth): Enable TLK110 Example on P4
* fix(eth): Fix Ethernet examples
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Add cezerio dev ESP32-C6
* Modify pin number of cezerio dev ESP32C6
Modify pin number of cezerio dev ESP32C6
* Update boards.txt
* Update USB_PID
Update USB_PID
* Update boards.txt
Deleted flash and partition options related in flash size bigger than 4MB
* Update pins_arduino.h
* Merge manually to solve conflicts
* Resolve Conflicts
* Add cezerio dev ESP32-C6
* Modify pin number of cezerio dev ESP32C6
Modify pin number of cezerio dev ESP32C6
* Update boards.txt
* Update USB_PID
Update USB_PID
* Update pins_arduino.h
* Add cezerio dev ESP32C6
* Update pins_arduino.h
* Update pins_arduino.h
* Update pins_arduino.h
* fix(usb): Update tinyusb init call
* Update esp-insights version (#10456)
* Add support for WiFi to ESP32-P4 (#10463)
* feat(p4): Add support for WiFi to ESP32-P4
Implements support for external MCU connected through SDIO
* fix(p4): Init SDIO host properly on Network boot
esp-hosted has one function marked as "constructor" that did not run in the boot phase of the chip. This calls the function when network is started
* Fix RainMaker dependent versions because Matter requires Insights 1.0.1
* IDF release/v5.3 707d097b
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Mahesh Tupe <tupemahesh91@gmail.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(p4): Add support for WiFi to ESP32-P4
Implements support for external MCU connected through SDIO
* fix(p4): Init SDIO host properly on Network boot
esp-hosted has one function marked as "constructor" that did not run in the boot phase of the chip. This calls the function when network is started
* fix(arduino): adds ESP32-P4 to the package description
Updates the Package description to add the P4 in 3.1.0
* fix(arduino): update readme title to add the P4
Adds ESP32-P$ to the list of supported SoC in README.md for Core 3.1.0
loop() calls Serial Events functions when those are declared. The way it was declared was forcing to alway call avalable() to then call an empty function. This commit fixes it.
* ci(partitions): Use default partition for compilation in CI
* fix(ci): Fix paths for sdkconfig
* Fix build of camera web server
* fix(ci): Fix test requirements check
* ci(append): Add option to append to all FQBNs
* fix(json): Fix JSON files to compile examples
* fix(example): Use requires instead of target in ci.json
fix(zigbee): Improve JSON files
Co-authored-by: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* fix(regex): Trim argument before grep
* docs(ci): Add documentation about FQBNs in CI
* fix(json): Remove redundant FQBNs
* fix(json): Skip requirements if libs are not installed
* fix(partitions): Use rainmaker specific partitions
---------
Co-authored-by: me-no-dev <hristo@espressif.com>
Co-authored-by: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* Initial commit - light bulb + switch working
* Add Thermostat + fix enum
* Dev update: roles, cb removal, handlers
Fixed ep_thermostat to compile successfully
Removed cb from all EP, as it have been removed, virtual methods will be used instead.
Moved zigbee handlers out of Zigbee_core to Zigbee_handlers for better readability.
Fixed zigbeeInit to be bool and return status of initialization for begin function.
Updated examples with edited roles and custom method for on_off light
* Dev update: implement on/off light and switch methods
Implemented basic function calls of switch commands to on/off light:
lightToggle, lightOn, lightOff, ...
Implemented virtual methods for on/off light that have to be override in user code:
setOnOff, sceneControl, setOnOffTime, setOffWaitTime
APIs can be changed, still early development.
* Dev update: Factory reset, names, multiple EPs
Implemented Factory reset of Zigbee device, in order to connect to new network without reflashing/erasing flash
Implemented optional setting for Manufacturer and Model names
Added option to allow endpoint to have multiple endpoint connected -> switch - 2 lights (tested)
Minor sketches update
* Dev update: Device ID to string
Implemented easy transfer from device it to Device type (0x0000 = ESP_ZB_HA_ON_OFF_SWITCH_DEVICE_ID -> "General On/Off switch".
* Implement cmd default response handler
* Remove unused _identify_cluster
* Dev Update: Color DImmable light + switch implemented
Implemeted color dimmable light and color dimmer switch HA devices + examples.
Removed unnecessary stored attribute cluster
Renamed on/off light and switch examples
* Implement Network Scanning
Implemented Zigbee network scanning (async) to mostly match WiFi scan APIs.
Added Zigbee_Scan_Networks example
* Dev Update: Thermostat and Temperature sensor EP
Implemeted thermostat and temperature sensor HA devices + examples.
Implemented configure report handler.
Updated READMEs and description of examples.
Minor code updates
* fix(): Replace deprecated function
* Remove ported IDF examples
* Update Zigbee examples with new APIs
* Dev Update: Version setting, Thermostat fix, ...
Simplified bounded device print as the structure is common for any EP type
Allowed setting custom app version for EP, default is 0
Small fixes and code updates
* Remove EP template + add lib to CMakeLists
* Rename classes to have proper naming
* Add check for SOC_IEEE802154_SUPPORTED
* Ignore false positive unused variable/function
* Fix compilation errors in examples
* Fill keyworkds.txt, remove unnecessary defines
* Rename methods, variables + make private/protected
* Remove unnecesary defaults defines
* Remove outdated comments
* Update Scan networks Readme
* fix(example): Use proper naming of func and variables
* Change virtual methods to callbacks (TODO)
* Refactor classes methods + implement Identify command
* Apply suggestions from code review by @lucasssvaz
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update READMEs + add openNetwork fucntion
* Use [[maybe_unused]] instead of #pragma
* Use gpio calls for OnOff Light example
* ci(pre-commit): Apply automatic fixes
* fix(): Codespell issues
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* fix(psram): Init PSRAM before app_main to fix mmu_map
Makes sure that PSRAM is part of the map before app_main is called.
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
The pin remapping functions have to be called as early as possible in
the begin() function, to immediately convert the input parameters to the
GPIO numbers used everywhere in the core.
This issue has always been dormant since the introduction of pin
remapping in 2.x via 9b4622d, but was exposed by the proper pin muxing
support that is present in the 3.x core.
Move the pin remapping function calls earlier in the begin() function to
fix this issue.
* ci(json): Add support for checking sdkconfig before running tests
* docs(ci): Add explanation about requires field in JSON
* fix(json): Ignore comments when searching requirements
* feat(json): Add extended regex support to requires field
* change(json): Move to using requirements in JSON
* fix(json): Fix requirements for touch tests
* refactor(json): Fix formatting of JSON files
* fix(spi): Fix SPI example and JSON
* DNSServer: fix improper startup code in WiFi mode
When running on WiFi-AP mode server's start() method returned true while in fact UDP listening socket was never created
Regression introduced in #8760Closes#10330
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
The digitalPinToInterrupt() macro currently remaps the pin number to the
GPIO number. This is not necessary, as most users will then use the
returned value in attachInterrupt() or other similar API functions,
which already perform the same remapping.
The first half of the macro (the condition) does indeed require the
remapping to ensure the check operates on GPIO numbers.
Fixesespressif/arduino-esp32#10367.
* fix(esp32p4): Add missing touchpad definitions
* fix(esp32p4): Add missing target in SPI example
* fix(esp32p4): Start touch driver fix
* fix(esp32p4): Skip touch examples while it is not implemented
* fix(esp32p4): Add missing analog pin definitions
* refactor(formatting): Fix formatting that was broken in P4 PR
* fix(openthread): Add missing targets to skip
* fix(esp32p4): Skip ethernet sketches
* fix(esp32p4): Disable periman test while touch is not implemented
* fix(esp32p4): Disable touch test while touch is not implemented
* fix(esp32p4): Fix UART test
* fix(esp32p4): Skip Wi-Fi test
* fix(esp32): Skip unsupported example
* fix(esp32p4): Fix skip files
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Update Matter Light README.md
Update Matter Light README.md
* fix(matter): information in the commentaries from SuGlider
* feat(matter): extended formating
used the same formatting for the whole document and changed a few expresssions.
* fix(matter): missing option idf.py
---------
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* feat(matter): partition file for matter
The declaration includes a partition for keys and SSL certificates.
* feat(matter): matter light source code
Adds necessary Matter + Arduino source code that will create a Matter compatible Light.
* feat(matter): adds sdkconfig and CMake files
Adds target sdkconfig files and the CMakeLists.txt in orde to build the application using Arduino+Matter as IDF component
* fix(matter): wrong folder name
* feat(matter): include example into registry
* fix(matter): error with type in wrong place
A declaration was incorrect due to a typo error. Sintax was corrected by deleting `BuiltInLED`.
* feat(matter): add readme documentation
* feat(matter): remove soc with no wifi or no ble
* feat(matter): adjust all sdkconfig files
* feat(matter): improve code and led status
* feat(matter): add button and led gpio with kconfig
* fix(matter): remove commented lines
* fix(matter): remove commented lines
* feat(matter): added a 2.4GHz SSID note
Both the ESP32 device and the Smartphone running the Matter APP shall be in the same WiFi Network in order to achieve a successful commissioning process.
* feat(matter): arduino managed comonent version
Preparing the Arduino Managed Component to use Core version 3.0.5 or higher.
* feat(matter): adds information about google
Goggle Home Assistant requires special configurtation in order to allow the Light to show up in the GHA APP.
* feat(matter): arduino component version
Set final Arduino Managed Component to 3.0.5 necessary because of -DESP32=ESP32, in order to compile the project.
* ci(pre-commit): Apply automatic fixes
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(typo): typo and commentaries
* fix(matter): spell check ignore for CI
* ci(pre-commit): Apply automatic fixes
* fix(matter): spell check ignore for CI
* fix(matter): spell check ignore for CI
* fix(matter): spell check ignore for CI
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* change(ESP_NOW_Serial): No teardown on retry limit
After max retries is met once the ESP_NOW_Serial_Class performs "end()".
This removes the peer from ESP_NOW.
Further messages to and from ESP_NOW_Serial are not received or sent.
Peer should stay in ESP_NOW to re-establish connection even with data loss.
This change will "retry and drop" the data piece by piece instead of aborting the connection.
* feat(espnow): Add remove on fail parameter
* feat(espnow): By default keep the peer when sending fails
---------
Co-authored-by: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* Fix missing virtual declarations in Stream.h
Fixes some changes made in PR #10328
* Remove the virtual destructor as Print class has one
As pointed out by @JAndrassy
* Fix(NetworkEvents): Don't skip event callbacks in NetworkEvents::removeEvent
Fixes Issue 10318
Includes pull request 10321 that fixes 10316
This change:
* Adds code to find the event callbacks
* Issues error when duplicate callbacks insertion attempts are made
* Issues error when callbacks are not found during removal
* Fix(NetworkEvents): Don't skip event callbacks in NetworkEvents::removeEvent
Fixes Issue 10318
Includes pull request 10321 that fixes 10316
This change:
* Adds code to find the event callbacks
* Issues warning when duplicate callbacks insertion attempts are made
* Issues warning when callbacks are not found during removal
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* [WiFiScan] Allow allocation to fail and prevent memory leak
When there are many AP's seen during a scan, the allocation of `_scanResult` may fail.
Thus add `(std::nothrow)` to the `new` call.
Also it is possible the array was still present before allocating a new one.
* [WiFiScan] Use nullptr instead of 0
As suggested by @me-no-dev
As it was written, it was possible to leak the scan result array if esp_wifi_scan_get_ap_records() failed. Change will ensure that the array is deleted in that case.
* docs(contrib): Add instructions on how to test changes
* fix(path): Fix file path
* Remove manual hooks as they do not exist anymore in the repo
* Fix typo
* feat(openthread): add extended example
Creates a new example that mixes different APIs
* feat(openthread): create cj.json file
Adds neessary CI file
* feat(openthread): improve the example
Update ExtendedRoterNode.ino with more use of API
* feat(openthread): improve the example
Adds OpenThread Native calls to the example
* feat(openthread): improve the example
Update LeaderNode.ino example to add OpenThread Native calls.
* fix(openthread): bad formatting using space
Update keywords.txt to use TAB instead of SPACE in order to recognize correctly the keywords.
* fix(openthread): bad example file name - typo
Changed ExtendedRoterNode to ExtendedRouterNode - Typo error.
* feat(openthread): add extended example ci.json file
Added CI file to the example.
* fix(openthread): deleted bad file names in the example
Delete libraries/OpenThread/examples/SimpleThreadNetwork/ExtendedRoterNode directory
* fix(openthread): typo in commentaries
* fix(openthread): typo in commentaries
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
The Arduino boards platform framework allows properties of a port to be associated with a board
definition. The Arduino development software will identify a port having the associated properties
as that board.
This should only be done for properties that are unique to the ports produced by that board model.
In cases where a board model does not produce a port with properties unique to that model, it is
irresponsible to associate those properties with the board definition as this will cause other
models to be inappropriately identified.
The authors of these board definitions associated them with non-unique USB VID/PID pairs so those
associations must be removed. The 303a:1001 VID/PID pair is of the hardware CDC serial port of the
native USB ESP32 chips. The others are stock VID/PID pairs of general purpose USB to serial bridge
chips that are used on many different board models.
* feat(hw_cdc): creates documentation for the example
Adds a README file that exaplains the example.
* feat(hw_cdc): create cmake config file
Adds necessary CMakeLists.txt file to the project with the HW CDC defines that will enable it.
* feat(hw_cdc): create sdkconfig.defaults
Adds necessary and minimum sdkconfig settings in order to make Arduino run as IDF Compoenent.
* feat(hw_cdc): create cmake config file
Create the Arduino Sketch source code CMakeLists.txt file that will include all source code files and header files in the proejct.
* feat(hw_cdc): create main.cpp
Adds the minimum Arduino Sketch that will print "Hello World!" in the HW Serial USB CDC port.
* feat(hw_cdc): create idf_component.yml
Adds necessary ESP32 Registry information in order to make ESP32 Arduino to be automatically included in the project as an IDF component.
* feat(hw_cdc): update main.cpp
adds code to wait for the user to open the Serial Monitor
* feat(hw_cdc): formating text code
Applying Code style and formating.
* feat(hw_cdc): adds the example to idf_component.yml
Adds the example to the list of example in the ESP32 Registry.
* ci(pre-commit): Apply automatic fixes
* fix(chw_cdc): typo fix
Fixed Typo in the documentation.
* fix(hw_cdc): fixed a commentary typo
Fixed commantary typo
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(boards): Correct PID port property in "Bee Data Logger" board def
VID and PID port property values are hexadecimal literals and thus use the standard "0x" prefix.
Previously, this prefix was missing from the PID port property association in the definition of the
board definition of "Bee Data Logger" board. This typo caused ports having the 0x303a, 0x815C
VID/PID pair to not be identified as a "Bee Data Logger" board as intended.
* fix(boards): Correct property names for PID port property associations
These properties are intended to associate values of the PID port property with "Bee" board
definitions. A typo caused them to instead associatiate the values with the VID port property. The
result was that ports with this VID/PID pair were not identified by the Arduino development
software as the board model as intended.
* fix(littlefs): Use VFSImpl::exists() to avoid false error log
* fix(ffat): Use VFSImpl::exists() to avoid false error log
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Fixes an issue related to ESP_MATTER component that defines a path using ESP32 as folder. Because Arduino defines ESP32 to 1, it causes an expansion error for folder using ESP32 folder name.
* Adds the ability to set the clock source for the LEDC
* feat(LEDC): Adjusting function names to more suitable
* feat(LEDC): Fix clock_source to static
* docs(ledc): Document ledc set and get clock source
* docs(ledc): Update ledcSetClockSource description
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Add ESP32-2432S028R dev board
Add support for the ESP32-2432S028R, aka Cheap Yellow Display (CYD) dev board.
* Add ESP32-2432S028R variant
Add ESP32-2432S028R, aka Cheap Yellow Display (CYD) variant
* Revise macro defined function names
Append brackets to all macro defined function names
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(timer): Typo - milis instead of millis.
* fix(doc0: format
fix CI error about format
---------
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* fix(esp32): Fixed the hint for the builtin neopixleWrite() function
* change(esp32): Added neopixelWriteOrdered() function
* change(esp32): Added neopixelWriteOrdered() function
* change(esp32): Added neopixelWriteOrdered() function
* change(esp32): Added the possibility to specify LED color order
* change(esp32): Added the possibility to specify LED color order
* feat(rgbled): add license information
* feat(rgbled): add color order enum
* feat(rgbled): add color order feature
* feat(rgbled): change color order for lolin_s3_mini
* fix(rgbled): suffix
* fix(rgbled): suffix
* ci(pre-commit): Apply automatic fixes
* fix(rgbled): it lacks GRB case
Made GRB default + switch/case exceptions.
* fix(rgbled): add guard for rgb_led_color_order_t
If RGB_BUILTIN_LED_COLOR_ORDER is not defined, the type rgb_led_color_order_t won't be declared.
* fix(rgb-led): Implement rgbLedWriteOrdered()
* ci(pre-commit): Apply automatic fixes
* Remove const to allow changing the order
---------
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>
Co-authored-by: me-no-dev <hristo@espressif.com>
Problem detected with ESP32 and ESP32-S2 when the baudrate goes to 460600 bps.
REF_TICK (2MHz) seem not to work properly.
Limiting the use of REF_TICK for up to 205 Kbps.
* Add CodeCell ESP32C3 variant folder
feat(variants): Add CodeCell ESP32C3 variant folder
Added the `codecell` folder to the `arduino-esp32/variants` directory to support the CodeCell ESP32C3 board. This folder includes the necessary pin mappings and configuration files.
* Update boards.txt for CodeCell ESP32C3
chore(board): Update boards.txt for CodeCell ESP32C3
Updated the boards.txt configuration to include settings specific to the CodeCell ESP32C3 board, such as upload speed and partition schemes.
* Update variants/CodeCell/pins_arduino.h
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* Delete variants/CodeCell directory
* Add codecell ESP32C3 variant folder
feat(variants): Add codecell ESP32C3 variant folder
Added the CodeCell ESP32C3 variant folder to support the CodeCell ESP32C3 board.
This folder contains the necessary pin mappings and configuration files.
* Update pins_arduino.h
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(3rd_party_board): Add Fri3d Badge 2024 (ESP32-S3 WROOM 1)
Image: https://github.com/Fri3dCamp/badge_2024/blob/main/docs/badge2024.jpg
More info on https://github.com/Fri3dCamp/badge_2024
* fix(3rd_party_board): Fix built in led for fri3d badge 2024
and use less X_ variables
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(board): Add Alfredo NoU3
Add board support for Alfredo Systems NoU3.
https://www.alfredosys.com/products/alfredo-nou3/
* fix(board): added I2C and SS pins to alfredo nou3
* fix(board): set SPI and I2C pin defs to -1
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Update M5Stack related board and pin configuration
* Remove redundant definitions
* Roll back the rainmaker partition table related configuration
* delete pid & vid
When performing an "OTA" upload via a network port, the user may configure the sketch to require
an authentication password.
Arduino IDE presents a "Configure and Upload" dialog when the user triggers an upload to a network
port. The user can provide the authentication password via the field in that dialog. The
`upload.field.password` platform property is then set to the value provided by the user.
The platform uses the `tools.esp_ota.upload.pattern` command template to pass this value to the
espota upload tool via the tool's `--auth` flag.
Since the value of the `upload.field.password` platform property is set by the user via a free text
field, it might contain any characters. Since some characters (e.g., spaces) can be problematic in
a command line, it is essential to wrap it in quotes. This was done for the Arduino IDE 1.x variant
of the command template, but that was not ported when the pluggable discovery variant of the
command pattern was defined. This causes a spurious failure of the OTA upload process if the user
provides an authentication password that contains problematic characters.
For example:
```
"C:\Users\per\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\tools\espota.exe" \
-r -i 192.168.254.145 \
-p 3232 --auth=foo bar \
-f "C:\Users\per\AppData\Local\Temp\arduino\sketches\E2D807FABB134A2A60A1B9C7D14FE02B/11973.ino.bin"
usage: espota.exe [-h] [-i ESP_IP] [-I HOST_IP] [-p ESP_PORT] [-P HOST_PORT]
[-a AUTH] [-f FILE] [-s] [-d] [-r] [-t TIMEOUT]
espota.exe: error: unrecognized arguments: bar
Failed uploading: uploading error: exit status 2
```
This is prevented by wrapping the `--auth` flag in quotes:
```
"C:\Users\per\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\tools\espota.exe" \
a-r -i 192.168.254.145 \
-p 3232 "--auth=foo bar" \
-f "C:\Users\per\AppData\Local\Temp\arduino\sketches\E2D807FABB134A2A60A1B9C7D14FE02B/11973.ino.bin"
Sending invitation to 192.168.254.145
Authenticating...OK
Uploading: [ ] 0%
```
* Correct Float type size
Correct in the data type table and the API call the size of the Preferences `Float` type and returned value for `putFloat()`.
* Update Float call prototype
* Correct Float type size
Correct Float type size in the Preferences Types table.
Revise text to use `float_t` in place of `float`.
* Correct doc build error
Correct the `Explicit markup ends without a blank line; unexpected unindent.`
* Update WebServer.ino
* Enable FAT and LittleFS filesystems as configured.
* use new versions of RequestHandler::canHandle and RequestHandler::canUpload
* Update Documentation
* Documentation changed accoring review comments.
* README.md changed accoring to review comments.
* feat(net): Add NAPT examples for STA and ETH
* feat(net): Add NAPT example for PPP
* feat(net): Add CI configs to skip H2
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(uart): Sets XTAL as clock source for uart
C6 and H2 have problems after returning from light sleep. The baud rate seems to be off when APB is used as clock source.
This fix solves the issue using a steady clock source.
* fix(typo): Typo and commentaries
Adds C2 in the XTAL list.
* fix(uart): adjust get/set baudrate
Fixes the functions for reading/writing UART baudrate by using IDF functions instead of HAL/LL.
* fix(uart): uses REF_TICK for ESP32/S2
* fix(uart): esp32/s2 baudrate > 1MHz
Fixes the baudrate for ESP32 and ESP32-S2 when the baud rate is higher than 1MHz.
REF_TICK is just 2MHZ and can handle up to 1MHZ baudrate.
* fix(uart): rxTimeout minimum
Default RxTimeout changed to the minimum = 1.
When TICK_REF is used as clock source, this is mandatory,
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Prints the value of the chip features bitfield to printChipInfo() to facilitate debugging.
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* fix(lwip): Add early out in `NetworkUDP::parsePacket()` when socket has no data
Previously, `NetworkUDP::parsePacket()` would take the time to allocate a 1460 byte buffer
to call `recvfrom()` with, immediately freeing it if there was no data read.
This change has it check if there is available data via `ioctl()` with `FIONREAD` first,
saving the allocation and thus significantly increasing performance in no data situations.
* fix(lwip): Initialize `len` to ensure it's set before check
* ci(wokwi): Pass diagram.json file if exists to pytest
* ci(wokwi): Rename diagrams to enable editing in Wokwi editor
* ci(tests): Use newest pytest version
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* feat(board) add Waveshare ESP32-S3-Matrix
Adds support for the Waveshare ESP32-S3-Matrix board. Includes changes to the Rainmaker partitions as per PR #10046 .
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* add "getBattery" functions + #define simplicity
replaced all function protections with a #define to simplify code functionality. Also added "getBattery" functions to leverage "esp_modem_get_battery_status" call in ESP-MODEM.
* add "getBattery" function defs to PPP.h
* fix(ppp): uncomment error logging, change new function naming
* fix(ppp): rename new functions for naming conformity
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* IDF release/v5.1 dc859c1e67
* fix(lwip): Filter out V6 packets if V6 is not enabled
the ESP might accept and act on some IPv6 packets, even though IPv6 is not enabled for the interface in Arduino. This change makes the ESP ignore all IPv6 packets if IPv6 address is not available.
* fix(lwip): DNS header is not required
* fix(ot): Add LWIP_HOOK_IP6_INPUT_CUSTOM support
* feat(ledc): Allow attaching multiple pins to 1 channel
* feat(ledc): Add ledcWriteChannel function
* feat(ledc): Print info about already set channel
* docs(ledc): Add ledcWriteChannel function and attach update
* feat(ledc): Add example and fixes
* feat(ledc): Remove commented code
* feat(ledc): Fix missing new line at end of file
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
The setPins() function obviously comes from the SD_MMC lib. Not prepending
that lib, this code won't compile.
Signed-off-by: Martin Hübner <martin.hubner@web.de>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* fix(nodemcu-32s): Fix Upload Speed menu on Windows
The board definition had 460800 as default upload speed, but that is invalid on Windows, so the menu did not show. This change puts 115200 as default, which will make the menu appear
* fix(board): Make build.board uppercase
* fix(example): Add better WPS logging
Provides a better log of what went wrong when using WPS
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(eth): Allow setting the RX task stack size
Default stack size of 2K might not be enough in some cases. Increase the default to safer 4K and allow setting it to custom value.
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Fix timeout in WebServer::_uploadReadByte and set timeout handleClient()
Fixes: #9990
* Set HTTP_MAX_CLOSE_WAIT equal to other HTTP_xxx_WAIT values
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(uart): Set back Pin signal polarity
Fixes a problem related to inverting signal polarity back to normal after a previous inversion.
This shall set the correct polarity in Serial.begin().
* fix(uart): Remove useless commentary
Removes a commentary with a question about the inversing polarity function.
* fix(uart): Update comment
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
If the interface is already connected, try to enable IPv6 immediately. Otherwise the interface would need to go through disconnect/connect cycle for IPv6 to be enabled.
* feat(OThread): Add Library
* fix(OpenThread): fixes file list in CMakeLists.txt
* fix(openthread): Fixes JSON CI Files
* fix(openthread): Fixes JSON CI Files
* fix(openthread): Include Openthread guarding
* fix(openthread): COAP parametrization
* fix(openthread): Include Openthread guarding
* fix(openthread): Improves commentaries and code
* fix(openthread): Improves code
* fix(openthread): Includes StreamString.h
* feat(openthread): New Scan Example
* feat(openthread): Improved Scan Example
* feat(openthread): README.md
Initial documentation for ESP3 Arduino OpenThread CLI API.
* feat(openthread): helper functions documentation
Create helper_functions.md for ESP32 Arduino OpenThread API
* fix(openthread): begin end
* feat(openthread): onReceice example
* fix(openthread): tx queue error
* fix(doc): fixing documentation apresentation
Fixes the documentation first paragraph in order to make it easier fore reading. It also displays in the very top which SoC are supported by the library.
* fix(doc): documentation format
* feat(openthread): commentary
* fix(openthread): Typo, start/stop console
* fix(openthread): library properties
* ci(pre-commit): Apply automatic fixes
* feat(openthread): formatting text
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(ppp): Make modem reset delay configurable
The delay required to reset Simcom modem modules varies significantly across
different models, even where they have otherwise identical AT command
sets.
Simcom A7672 was failing to reset with the default 200ms delay. Make the reset
delay configurable to allow customising this for a specific modem.
Default delay, if not specified is kept at 200ms.
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat(net): Deprecate old WiFi APIs
Deprecates WiFiClient, WiFiServer, WiFiUdp and WiFiClientSecure
* fix(net): add defines to WiFi.h
Defines are added to not cause deprecation warnings. Will be removed in the future
* fix(net): Use typedefs instead to help with forward declarations
Defines do not allow forward declarations
* feat(rmt): Solve neopixel issue
if neopixelWrite() is used from different tasks/isr_callbacks, it may result in a concurrency problem and many detach/attach calls in sequence, but not in synch.
This commit avoids initializing the neopixel GPIO again and improves the respomse time of neopixelWrite().
* HTTPClient lib - add HTTPCLIENT_NOSECURE build flag
`HTTPCLIENT_NOSECURE` build flag disables TLS support in HTTPClient library by
excluding `NetworkClientSecure.h` header.
This allows linker to strip down mbedTLS lind and certificates bundle,
which in turn reduces firmware image for about ~80kib.
* Update HTTPClient.cpp
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(example): EXT0 and EXT1 wakeup
Fixes the Deep Sleep wakup example to run with IDF5.1. The API has changed and a adjustment was necessary.
* feat(wakeup): Use Macro for GPIO_NUM
Changed the example to use a #define for the RTC IO Pin (GPIO) used in the example.
* fix(typo): typo and commentaries
Fixes the commentary to the correct IDF terms.
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Adds a class for 0x2901 - Characteristic User Descriptor.
This Descriptor is usual in BLE and describes with text what each characteristic is about.
Improve Notify.ino example by adding the 0x2901 descriptor
* fix(netbios): Return interface address for NetBIOS
When NetBIOS returns a match, it should return the IP address of the device.
Presently, however, it returns the address of multicast IP for the subnet
since the incoming NBNS packet's UDP target will be multicast
(i.e. 192.168.1.255).
Iterate over the active network interfaces and check netmasks to determine
where the packet came from, and return the appropriate IP interface address
instead.
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(wifi): Fix WiFi setTxPower and getTxPower
We need to wait for the interface to be started in order to be able to set/get TX Power. Code was returning too early, so calling the functions after `begin()` resulted in failure.
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* feat: added support for filters in webserver
* feat: add setFilter function in StaticRequestHandler
* fix: ON_STA_FILTER & ON_AP_FILTER
* fix: make request handlers backward compatible
* fix: ON_STA_FILTER & ON_AP_FILTER
* fix: more filters to their own example
* chore: grammar
* fix: remove filters from header file
* fix: use same root route for both interfaces
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(xtal): Add a way to change the XTAL frequency
Add support for boards like SparkFun ESP32 Thing that use 26MHz XTAL
* ci(pre-commit): Apply automatic fixes
* feat(dbg): Print the XTAL frequency in the debug report
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* ci(tests): Swap cache to artifacts to avoid errors between OSes
* ci(push): Fix chunk generation for compilation
* ci(tests): Fix error code propagation
* ci(push): Add shebang to new script
* ci(push): Fix sizes upload if there is no changes
* ci(bot): Fix GitHub actions bot commit info
* ci(fix): Fix new workflows
* ci(pre-commit): Properly cache python modules
* fix(get.py): Verify files after extraction and make it more readable
* ci(idf): Compile as component when libs change
* ci(wokwi): Re-enable cache for wokwi tests
* ci(tests): Run scripts only from master
* Revert "fix(get.py): Verify files after extraction and make it more readable"
This reverts commit cc40edb40766ea8a013c0d76326bc57314418bff.
* ci(compilation): Fix changed files check
* ci(wokwi): Disable tests that use scenarios
* fix(ssl): Fix load stream memory leak
Loading Ca Cert/Certificate or Private Key from stream was leaking memory, due to buffers not being freed.
* fix(ssl): Cast the buffers to non-const
* feat(usb): Support the new USB IDF API
Required for the latest ESP-IDF release/v5.1
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* fix(platform): Use Win path separator in ESP_SR copy command pattern
Although Windows generally supports the use of the POSIX compliant slash path separator in addition
to the Windows native backslash separator, in the specific use case where a path is present in a
native command executed via an argument to `cmd /c` in a platform command pattern, it is mandatory
to use backslash path separators.
Previously, a slash path separator was used in the `tools.esp32-arduino-libs.path` and
`compiler.sdk.path` platform properties, which were referenced in a `copy` command in the `cmd /c`
argument part of the platform's `recipe.hooks.objcopy.postobjcopy.2.pattern.windows` command
pattern. This caused compilation to fail with a "The syntax of the command is incorrect." error
under the following conditions:
- The compilation is performed on a Windows machine
- The compiled sketch uses the ESP_SR library
This is fixed by adding Windows override variants of the properties, with backslash path separators.
* fix(release): Remove windows path to libs when releasing
---------
Co-authored-by: me-no-dev <hristo@espressif.com>
* docs(libraries): Add new SoCs
* docs(): Add C2 and H2 to USB and getting started
* docs(): Fix table format
* docs(extension): Add sphinxemoji support
* docs(): Lower emoji version
* Revert "docs(): Lower emoji version"
This reverts commit 3f3e0adf3c3c585bb439b182c77708fce23bd0b9.
* Revert "docs(extension): Add sphinxemoji support"
This reverts commit e903da689d4531f7fa7327e042206a4cdc3422a8.
* docs(): Shrink peripherals table
* docs(): Shrink table even more
* docs(): Shrink table more and more
* docs(): Shrink table the most I am able to
* fix(boards): boards must define unique VID/PID
Also adds a hidden board with the default VID/PID of USB CDC/JTAG in order to always show that in IDE when ESP32 CDC/JTAG device is connected
* fix(boards): Skip test for the generic board
* Trigger board test
* fix(boards): Make discovery work on IDE2
* fix(net): Don't unreg events if there are netifs
Unregister IP events only if all other netifs are stopped.
* fix(eth): Delete mac and phy on end
* fix(net): Update pin naming and log levels
* add board support for Autosport Labs ESP32-CAN-X2 development board
* change(board-support): Add board support for Autosport Labs ESP32-CAN-X2 development board
* change(board-support) - remove entries that are already globally defined
* change(board-support) rename board name
* change(board-support) switch ASL-CAN-X2 to ASL_CAN_X2
* change(board-support) fix formatting, correct USB VID/PID to match our own product
* Update variants/aslcanx2/pins_arduino.h
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update variants/aslcanx2/pins_arduino.h
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Add ZACwire to External libraries compilation test
* fix example path
* fix(lib): fixed link to right examples
The previously linked example wasn't working, so I linked two other examples, which are more up to date
* change(logging): Provide a default TAG name for USE_ESP_IDF_LOG
The ESP-IDF logging library has some nice features such as log
forwarding. esp32-hal-log.h has long supported the USE_ESP_IDF_LOG
macro, but due to subsequent changes, it requires a global TAG
preprocessor macro to be defined. The macro name is too generic and
just having a sane default would be preferable.
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Setting programmer.default has unfortunately multiple effects:
- sets the tick by default in the Tool menu in the IDE (which was the
expected behavior),
- forces the CLI to use the specified programmer every time an upload is
attempted (which is confusing users).
For this reason, it is better to remove the "programmer.default" setting
from the board definition and let the user choose the programmer in the
IDE menus, as it was before.
* 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>
* 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>
* (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>
* fix: NetworkClient - close the connection in stop() method
for all copies referring it
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* ci(wokwi): Add wokwi emulator to CI
* feat(wokwi): Support scenario
* feat(wokwi): Add simple CI test for push button
* sudo apt command
* sudo both apt commands
* Add missing test.py file
* Test pytest path changes
* empty push
* move wokwi cli token variable
* move token back to wokwi job
* Update hil.yml
* Update hil.yml
* revert run on pr
* run on PR target
* run only on master
* ci(wokwi): Support wokwi
* ci(wokwi): Skip unsupported and performance test
* ci(wokwi): run wokwi tests without label
* debug: run build on windows
* RUN WIFI WITH PSRAM ON-OFF
* fix psram for S3
* Revert "debug: run build on windows"
This reverts commit bc085e50502eb470836276097fa45ee0e2374ed1.
* ci(wokwi): Run workflow only if build was sucessful
* ci(pre-commit): Apply automatic fixes
* ci(wokwi): Add generated files to gitignore
---------
Co-authored-by: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* 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>
* feat: Ethernet - MAC address parameter for beginSPI
and `friend class EthernetClass`
as support for potential Arduino API compatibility layer
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
* Remove event-file from External libs wf
* Add compilation log to the build scripts
* Add 2nd compilation run on base branch
* Fix sketch_utils script
* Update on-push.sh
* Update Push workflow
* Upload pr number in lib.yml
* Fix PR number in publish sizes
* Update external libs results with pr num file
Work around because AF_UNSPEC does not check available addresses when
determining result.
If you have a global scope IPv6 address, then first check for IPv6 DNS result;
if you don't have an IPv6, or there is no IPv6 result, then check IPv4.
This allows IPv6-only networks to connect to dual-stack destinations, as they
will get the IPv6 address (rather than the unusable IPv4).
It also means a dual-stack host to a dual-stack destination will preference
IPv6.
There is no effect if you are on an IPv4-only network, or it is an IPv4-only
destination.
Similar to NetworkClient, check the family of the passed in address and configure the socket and socket address accordingly, for both IPv6 and IPv4 support.
* feat(net): Add support for esp_netif flags
Provides better automation for setting IP/DNS
* feat(net): Show DHCPC status as OFF when static IP is used
* fix(dns): Handle IPv6 DNS server address results
If the result from esp_netif_get_dns_info is an IPv6 address, then parse to an IPAddress.
* fix(dns): Use getaddrinfo for DNS, to fix some IPv6 issues
Replace hostbyname with getaddrinfo for better IPv6 support. The API is also
simpler, as it has no callbacks (they are handled internally). Allows
dual-stack networks to connect to IPv6-only destinations.
Still does not work for IPv6-only networks, as IPv6 DNS is not enabled in the
pre-built ESP-IDF libraries.
* feat(libs): Add ESP-NOW Arduino library
* Update libraries/ESP_NOW/src/ESP32_NOW.cpp
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/ESP_NOW/src/ESP32_NOW.cpp
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* fix(esp-now): Add check if Wifi is started.
* Fix ESP_NOW_Serial
* Add ESP NOW Serial Example
* Add comment
* Skip esp-now example for esp32h2
* Add broadcast address constant
* Change return value to align with other APIs
* Apply suggested changes
* Improve example
* Fix example
* Improve serial example
* Add argument to receive callback to know if a message was broadcasted
* Update libraries/ESP_NOW/src/ESP32_NOW_Serial.cpp
* Simplify example
* Add broadcast example
* Change comments
* Change comment
* Improve broadcast master example
* Remove examples using IDF's API
* Fix example
* Add network example
* Add skip file
* Add LMK back
* Add logs
* Improve example
* Fix example
* Apply @suglider suggestions from code review
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* Add documentation
* fix examples links in docs
* Apply @lucasssvaz suggestions to docs
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update espnow.rst
* Update examples
* make onSent optional and remove underscores for virtual functions
* Make onRecieve also optional and make constructor protected
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: me-no-dev <hristo@espressif.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* Matched pin numbers in doco to numbers in variants files
* Non-breaking dashes
* Changed SD examples to make REASSIGN_PINS more transparent. Fixes#9082
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* Create ESP_NetworkInterface class and have Ethernet extending it
* Update CMakeLists.txt
* Split networking from WiFi (H2 can now use Ethernet)
Now all libs have been checked yet. More to do on WiFi side
* Fix build errors
* Guard WiFi classes and fix RMII ETH examples
* Decouple network related libraries from WiFi
* Fix examples and WiFiUpdate
* Guard WiFiProv lib to compile only on WiFi chips
* Add periman string for network and "fix" mdns on the first ETH
* Revert back location of Client/Server/Udp in order to accept some PRs
* Fix periman
* Some fixes from merging master
* Fix web server missing fs.h
* Move Client, Server and Udp out of WiFi
* More fixes
* more fixes
* Fix CMakekLists and rework lib menu dependencies
* Fix CMake issues
* move back WiFiClient to rebase with master
* Update ETH_TLK110.ino
* Move back WiFiClient
* Update progress
* Update WiFiGeneric.cpp
* More fixes
* Switch AP to the new interface
* Cleanup
* Rename AP methods
* Add extra interface info for Printable
* Rename IPv6 getters to clarify that they are returning LinkLocal address
cc @sgryphon
* Rename network classes
cc @sgryphon
* Update NetworkManager.h
* Rename WiFi Server and UDP
* Rename WiFiClient and WiFiClientSecure
* Update CMakeLists.txt
* Update on-push.sh
* Rename Network library
* Remove unnecessary guard
* Get the correct interface MAC address for mDND Workstation service
* Apply suggestions from code review
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* 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.)
* feat: onReceiveExample.ino
Adds a new example that uses HardwareSerial::onReceive(). The example demosntrates how to read all the data sent to UART0, considering that the end of transmission is defined by a period of time with UART in idle state.
* fix: onReceiveExample.ino
Fixes typos
* feat: add explanation header
* fix: mutex release
* fix: add Mutex verification
* feat: Mutex error message
* feat: Mutex NULL testing
* 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>
* 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
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.
* 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.
* fix: LED Pin Modified
fix: LED Pin Modified
* Revert "fix: LED Pin Modified"
This reverts commit 36bdbdbe0cdf40da82fae84acfca01da93999180.
* fix: LED Pin Modified to support Hardware update
fix: LED Pin Modified to support Hardware update
* 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
* 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>
* WT32-SC01 PLUS support
Added pins_arduino.h and a boilerplate boards.txt entry for the Panlee WT32-SC01 Plus.
* Update pins_arduino.h
Edited the name to correctly reflect WT32-SC01 PLUS
* Update variants/wt32-sc01-plus/pins_arduino.h
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* ADD(tinyuf2 things): Added tinyuf2 bins
ADD(tinyuf2 things): Added tinyuf2 bins
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* Add Board support for Geekble ESP32-C3 Custom Module
feat: Add Board support for Geekble ESP32-C3 Custom Module
* fix: remove globally defined variables in pins_arduino.h
fix: remove globally defined variables in pins_arduino.h
* [W5500] Support no-IRQ
Requires this commit from ESP-IDF to be cherry picked:
fd0a1dc53c
* Remove unrelated code to support ETH_PHY_JL1101
* remove the commented check and fix the error message
* Guard feature to be enabled when IDF backports it to v5.1
---------
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>
* Added new Olimex boards
Added variants for ESP32-H2-DevKit-LiPo and ESP32-SBC-FabGL boards
* Changes on the ESP32-POE and POE-ISO
Added menu for selection of the:
1) PSRAM enabled/disabled
2) Flash size 4/16 MB
3) Flash mode QIO/DIO
4) Partition Scheme additional options
* Updated pins_arduino.h for ESP32 POE, POE-ISO and Gateway
Due to the latest changes in the ethernet library/examples (https://github.com/espressif/arduino-esp32/pull/9242) full package of definitions of the ethernet macros is for each board that has non-default values.
For POE and POE-ISO is added a preprocessor condition #if defined BOARD_HAS_PSRAM due to our specific hardware because GPIO 16 and 17 are in use when PSRAM is enabled.
* Update boards.txt
Removed the -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
fix flags as suggested by Jason2866 and me-no-dev
* Update boards.txt
Reverted changes for ESP32-POE and ESP32-POE-ISO
* Update boards.txt
Rearrange of the enable/disable entries of the PSRAM option for ESP32-SBC-FabGL to be enabled by default.
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* fix(esp32): 🐛 Fixed "Invalid mbox" in the Wi-Fi example
* fix: changes the code to actually connect to the WiFi in roder to get time and date
* fix: removing call to WiFi.begin() at the end of the sketch. It must be called at first.
---------
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* 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
Update subpart ("PostArg") parsing to ignore extra headers instead of silently failing.
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* 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>
* Split start_ssl_client into two phases; to allow the implementation of protocols that use some sort of in-band STARTTLS or STARTSSL signal to upgrade a plaint text connection to SSL/TLS. Examples of these protocols are XMPP, SMTP and various database TCP connections.
* Remove removed setTimeout that was accidentally included (was removed for IDF >=5), bring timeout inline with the other timeouts (ints), fix cert/key checks to look if there is actually something there (all issues caught by the CI/CD on windows-latest
* Quell compiler warning; use the right timeout
* Newer versions of MBEDTLS make the client key struct private (and most of the x509 struct too), so absent of a non-null pointer we cannot check wether it is populated. Solve this by looking at the version (as 0 is not a valid x509 version).
* Fix another \(rightfull\) compiler warning iwth the version pointer
* Quell CI/CD runs on non-WiFi supporting hardare
* Quell CI/CD runs on non-WiFi supporting hardare
* Fix typo in directory name
* Apply suggestions from code review
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* Rename Files
* Remove leftover file
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* feature: create a Trust on First Use example the quell the increasingly common copy & paste of the insecure approach making it to production
* Quell CI/CD runs on non-WiFi supporting hardare
* Update libraries/WiFiClientSecure/examples/WiFiClientInsecure/WiFiClientInsecure.ino
typo/improvement to text
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
typo/improvement to text
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
Fix formatting
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
typo/improvement to text
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
typo/improvement to text
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
typo/improvement to text
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
typo/improvement to text
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
typo/improvement to text
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Various things can all stop_ssl_socket() which sets the socket to -1; but the WiFiClientSecure checks for _connected. So we want to make sure the latter is always set. And thus have moved the state handling around *ssl_client down into the C code; below WiFiClientSecure.
* Unitialized NVRAM/EEPROM is actual set to 0xFF; so adjust for this. And print the LF/CR for the header lines.
* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* refactor(on-release): improve platform.txt path replacements
Use regexs to replace all occurrences of `{runtime.platform.path}` with
the correct `{runtime.tools.*.path}`, regardless of directory separator,
and remove dependency on specific text around each path.
Note that the order has been changed to ensure that the longest paths
are replaced first, to avoid replacing parts of other paths.
* fix(platform): Windows backslash cleanups
Ensure Windows paths properly use a backslash as folder separator.
* feat(platform)!: use new Arduino Debug API
Implement sketch debugging according to the official Arduino
Platform Debug Specification [1].
The biggest improvement is that now `launch.json` can be fully
customized by the core (including the type of each entry),
so there is no need to copy files in the sketch folder.
In particular, `debug_custom.json` is not used anymore.
[1] https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-debugging-configuration
BREAKING CHANGE: This commit requires Arduino IDE 2.3.0 or later to use
the debugging features. Older versions will no longer be able to start
a debug session successfully.
* feat(debug): pass objdump path to resolve globals
Cortex-debug requires objdump to be in the same folder as gdb, or needs
the full path to the executable in the `launch.json` file. This is now
possible with the new debugging API.
* feat(debug): conditionally enable debug button on Nano ESP32
If the `debug.executable` variable is null or unset, the Debug button
appears grayed out. The new IDE also takes current parameters into
account, allowing to conditionally enable the Debug button only when
some conditions are met.
* on_release: allow single board packages
---------
Co-authored-by: Martino Facchin <m.facchin@arduino.cc>
* Update Update.h
* Update Updater.cpp
* Add files via upload
* Add files via upload
* Add files via upload
* Update Update.h
* Update Updater.cpp
* Add files via upload
* Revert changes
* Revert changes
* Fix CI
* Fix format
* Skip H2
* Use new
* Fix comments and formatting
* Format example
* Remove binaries and QoL improvements
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* 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>
The Arduino Platform Specification requires that the recipe hooks are
distinguished by a number and does not endorse using text labels. Fix
all the usages of recipe hooks to use numbers.
Closesarduino/arduino-cli#2369 .
* Proposal for fixing file webserver uploads via form upload.
The form parser has shown to have issues with files ending with "--\r\n". This commit replaces the form parser with the parser from ESP8266, which passes the test case.
* Replace _uploadReadByte() in WebServer/Parsing.cpp with ESP8266 implementation.
* Changes on the requirements file to remove dependencies
* Comment removed
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Separated library sources in cmake for selective.
* Reodered selective process to match CI script
* Fixed missing SimpleBLE in library list
* fix(cmake): Remove duplicate or non existing sources
* fix(cmake): Remove required component
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* OTA upload often fails when client.read() return -1 and we subsequently try to write 4 gigabytes to flash. Fixed by signed comparison and retry.
* Delay of 1ms already solves the issue
* Update libraries/ArduinoOTA/src/ArduinoOTA.cpp
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
---------
Co-authored-by: Leif <git@leif.lc>
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>
* Update Ticker API to compatibility with ESP8266, prepares for co-op loop Scheduler
* Fixing Build server complaints
* Fix omitted casts in template member function
* Changes after review
* Expose µs resolution of OS API in Ticker class
* Return Ticker to libraries only for modularity.
* Unify Ticker examples.
* Default for LED_BUILTIN
* In Ticker, the *scheduled functions become available in another development branch.
* Astyle from ESP8266
* Fixed Arduino keywords.txt
* 64bit integers instead of 32bits, timer functions on ESP32 accept 64bit integers.
* Move code from header into compiliation unit.
Reformat.
* Test case same as ESP8266
* Implementing inline in header saves 204+ bytes program size.
* Examples
* Fix a compiler warning due to c-style casting.
* Revert formatting changes
* More format reversions
* Revert
* Revert
* Revert
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Adds SparkFun Pro Micro ESP32-C3 variant file
Adds SparkFun Pro Micro ESP32-C3 variant to boards.txt
* removes some pin definitions that are defined elsewhere
* removes the accidental camel case in variant folder name
* Attempts again to fix camel case in the variant file
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* 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>
* feat(wifi): Improves WiFiMulti
* fix(wifi): Fixes Initialization of Security Mode
* feat(wifi): simplifies the example by using HTTPClient
* fix(WiFi): fixes a type in the commentaries
because print-to-all-clients is not implemented
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* feat(i2s): Add I2S examples
- ES8388 loopback example using the LyraT board
- ESP32-S3-EYE record WAV to SD card example
- Simple tone example
* docs(i2s): Add I2S API docs
* 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>
* Changed the docs server from preview to deploy
* Removed one extra line
* Added on release action to the docs deploy CI
* Fix CI workflow file name in the path
* 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
* Add MakerGo C3 SuperMini def
* fix(makergo_c3_supermini): Remove pin definitions.
Remove pin definitions since this part has been moved to the core and it defines globally per SoC & add an empty line at the end of the file.
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* add heltec_wireless_tracker board
* Move the EraseFlash section to the end of the board.
* Restore readme.md document.
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* 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>
there may be other copy of WiFiClient working with that connection.
let shared_ptr stop the connection when it is not refered anymore.
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* Fix on the Docs deploy CI
* Removed the docs build badge (RTD)
* Update .github/workflows/docs_build.yml
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
---------
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* 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>
* Fix and add pin definitions
Add pins D7, D8
Correct pin numbers for ALARM and EN
* Enable CDC on boot
* Use partition schemes appropriate for flash size
Also adds another partition scheme based of off default_8MB, but fat
partition.
* Added Serial as RS485 interface demo
* Added more detail to initial comment
* Switched to UART_MODE definitions from uart_types.h in order to accomodate some versions of Arduino core
* Update libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
* Update libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
* Update libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
* Removed HardwareSerial.h include. Switched RTS pin to GPIO 4 for broader compatability.
* using 115200 for UART0 - console
---------
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* DNSServer: switch to AsyncUDP instead of WiFiUDP
AsyncUDP offers event driven approch for handling udp dns req's
WiFiUDP hooks to loop() for packet processing and making useless malloc's each run
* DNSServer code refactoring
get rid of intermediate mem buffers and extra data copies,
most of the data could be referenced or copied from the source packet
- removed _buffer member
- replaced DNSQuestion.QName from uint8_t[] to char*
added sanity checks for mem bounds
optimize label/packet length calculations
other code cleanup
* DNSServer drop dynamically allocated member structs
DNSHeader and DNSQuestion structs could be created on stack
no need to keep it as obj members
* DNSServer: labels min length checks, simplified labels parser
* DNSServer use default settings for catch-all setup
- default constructor and start() method simply runs a catch-all DNS setup
- avoid string comparison for domain reqs in catch-all mode
- use IPaddress class for _resolvedIP (looking for IPv6 support in future)
* CaptivePortal example refactored
- use webserver instead of simple tcp setver
- use redirects to allows CaptivePortal detection pop-ups in modern systems
* DNSServer status getters added
add isUp() method - returns 'true' if server is up and UDP socket is listening for UDP req's
add isCaptive() method - returns 'true' if server runs in catch-all (captive portal mode)
some doxygen comments added
start() method now keeps existing IP address if any
---------
Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* feat(ipaddress): add support for ipv6 type, following arduinocore api
* feat(ipaddress): align with latest arduinocore api
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* Removed virtual + moved socketOptions ot read/write
* Removed no needed code + edit
* removed Client::getTimeout
* removed setTimeout from WifiClient - read/write timeouts in constructor now
* Changed seconds to miliseconds in other classes relaed + examples
* Applied same changes for WifiClientSecure
* Added 0 init values to constructor
* Seconds are not rounded now
* removed +500 for previous rounding
+ unnecessary comments removed.
* fix rebased code in WifiClientSecure
* Fix rebased code
* Fix rebase code
* Create WiFiScanAsync.ino
* Create .skip.esp32h2
* Create README.md
* Update README.md - adds C6
* Update wifi.rst with new example
* avoid timeout with Async Mode
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
dns_gethostbyname, as used in hostByName, is required to run in lwIP's TCP/IP
context. This can be verified by enabling LWIP_CHECK_THREAD_SAFETY in the
sdkconfig.
Calling dns_gethostbyname from the Arduino task can trigger race conditions
in lwIP or lower layers. One possibility is a corruption of IDF's Ethernet
buffers, causing an unstoppable flood of "insufficient TX buffer size" errors,
effectively severing all Ethernet connectivity.
This patch makes sure to call dns_gethostbyname from lwIP's TCP/IP context.
* Compile error if CONFIG_FREERTOS_HZ != 1000
* add a check at the CMake level, per feedback
* fix a punctuation glitch
* Remove `_Static_assert` per feedback
* add documentation on threading issues with WiFi.onEvent()
* more comments
* thin out comments, add docs
* Update WiFiProv.ino merge conflict issue fixed
* Added the CLK type and MAC from eFuse to Ethernet begin
* Fixed the order and arguments on the Ethernet begin function
---------
Co-authored-by: Pedro Minatel <pedro.minatel@espressif.com>
Co-authored-by: Pedro Minatel <pminatel@gmail.com>
* uppercase heltec board names
* debug commit - will be reverted
* debug commit - will be reverted
* debug commit - will be reverted
* debug commit - will be reverted
* revert debug commits
* Added USBMIDI support to libraries/USB
* Added MIDI examples to libraries/USB
* Added missing newline at end of file to MidiController.ino
* Added USBMIDI.cpp to CMake file
* Fix narrowing conversion warning in USBMIDI.cpp
* Fix incomplete initializers warning in USBMIDI.cpp
* Apply suggestions from code review
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
* add skip files for C6+H2
* remove already patched workaroud for bug
* move #define to top of file
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
1. Like a real keyboard, the USB interface descriptor will have an interface
subclass of boot and an interface protocol of keyboard. This will cause
some PC BIOS to send a SET PROTOCOL BOOT request to the device.
2. When the device sends reports to the host, if the host requested boot
protocol, don't send a report ID because boot protocol does not use report
IDs.
3. To work with some simple PC BIOS:
a. Use endpoint address of 1 for input and output.
b. Use separate reports for the shift key. These extra reports can be
disabled by calling USBHIDKeyboard::setShiftKeyReports(false).
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* Update BLERemoteCharacteristic.cpp
Fix kernel panic issue when trying to release BLEClient when the target device have a ble descriptor.
* Update BLERemoteCharacteristic.cpp
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
---------
Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
Turns out that disabling the periman APIs from remap has a negligible
effect on the source: the core is already excluded from remapping, as
are most of the libraries. It's also expected to be a private API not
exposed by default.
This patch removes it from both esp32-hal.h and io_pin_remap.h,
adjusting the relevant libraries.
* Modified 'BLEAdvertising.h' & 'BLEAdvertising.cpp'
Added three methods for removing service UUID from BLEAdvertised
* Update BLEAdvertising.cpp
Changed 'i' to 'index'
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
* esp32-hal-bt.c free Bluetooth LE memory if CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY is set
BLE memory can be released if bluetooth-classic - only is requested
* tStart( add error output
* ble mem_release only for esp32
* disable BLE with BT_MODE define
* BluetoothSerial add begin()+disableBLE; add memrelease
* btStart with BT_MODE parameter
* beautification
* Update BluetoothSerial.cpp fix wrong merges
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* [pin_remap 1/3] platform: define ARDUINO_CORE_BUILD when building core files
* [pin_remap 2/3] core,libs: add pin remap hooks
* platform: remove previous build options if file is missing
"touch" would create the file if not present, but not delete its
contents if a previous run left the file in the build dir.
* platform: make debug_custom.json file customizable by board
* platform: fix default debug prefix
"debug.toolchain.prefix" must end with a dash, since only the tool name is
appended to this string.
The reason this is not a major issue is that the "debug_custom.json" file
(copied in the sketch directory when debugging is enabled) forces its own
prefix. And to make things more interesting, the "toolchainPrefix" entry
in that file should _not_ end with a dash.
* [pin_remap 3/3]: add Arduino Nano ESP32 board
* fix: periman: include it by default, add include guard
* fix: io_pin_remap: adjust for new perimap APIs
* fix: libraries: manually handled pin remapping files
Previously all libraries invoked either high-level APIs (transparently
remapped, like the user sketch) or low-level ESP-IDF calls (where the
remap to GPIO numbers had to be added manually).
Since 3.x, some of these are mixed (for example, periman* APIs are
remapped, while soc* are not). This must be handled by disabling the
automatic API remapping and making sure all calls use GPIO numbers.
* feat: show remapped pins in chip debug reports
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* Example sketch prints MAC for different interfaces
Interfaces described in documenation: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/misc_system_api.html#mac-address
* Update README.md to include 'MacAddress'
* Add files via upload
* Delete libraries/ESP32/examples/MacAddress/GetMacAddress.ino
* Delete libraries/ESP32/examples/MacAddress/GetMacAddress/GetMacAddress.ino
* Delete libraries/ESP32/examples/MacAddress/GetMacAddress/MacAddress directory
* Add files via upload
* Add files via upload
* Adds necessary MAC header file
* Reverting - moving to the sketch
* Adds include with esp_mac_type_t values
---------
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* Example for IDF component registry
* Added readme
* updated readme
* remove idf dependency
* add empty lines on file end
* idf_component.yml version change
* Updated readme for local development
---------
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* Update RMT initialization code
- Commented out setting interrupt priority for both TX and RX configurations in the RMT initialization code.
* checks IDF version within RMT interrupt priority
---------
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* Update WiFiClient.h
Added missing getSocketOption() with full access to level and option
* Update WiFiClient.h
* Handle timeout settings below 1 second
Fix error with connect timeout settings below 1000ms.
Add getsocketoptions function.
* Add cast for setsockopt length
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
* Added Bandwith setting method
* Separted AP and STA on it's own class each
* Missing WiFi
* Rename for consistency
---------
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
esp8266 and esp32 server.available() is not implemented as documented
it is implemented like server.accept() is documented by Arduino
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* Extended bus types for peripheral manager
* add extra_type to peripheral manager
* Fix function call
* Fix check for no extra_type
* Add extra_type for SD and ETH CS pin
* added bus_num and bus_channel to pin structure
* update printPerimanInfo with new fields
* replaced setting bus to INIT with DetachPin call
* add defines for extra attributes
* use new required parameters in perimanSetPinBus
* function rename
* removed duplicate define
* Update print format
---------
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
* add senseBox MCU-S2
Add new senseBox Board (MCU-S2) with ESP32-S2
* update senseBox MCU-S2 integration
* update pins_arduino.h
* remove defines and add end symbols
* remove Serial Alias
* change board order
* Add support for ESP32-S3 PowerFeather
* Replace GPIO_NUM_X with just the pin number
* Pattern powerfeather entries after generic s3 board
* Remove redefinitions, add pin aliases to pins_arduino.h
* fix ZigbeeMode mennu for adafruit boards
* remove tinyuf2 csv in variant, use csv in tools/partiions
* add tinyuf2 no ota partitions scheme for all adafruit boards
*Please note that we can only process feature requests reported in English to ensure effective communication and support. Feature requests written in other languages will be closed, with a request to rewrite them in English.
*We welcome any ideas or feature requests! It is helpful if you can explain exactly why the feature would be useful.
*There are usually some outstanding feature requests in the [existing issues list](https://github.com/espressif/arduino-esp32/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Feature+request%22), feel free to add comments to them.
*If you would like to contribute, please read the [contributions guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html).
*Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
*Please note that we can only process issues reported in English to ensure effective communication and support. Issues written in other languages will be closed, with a request to rewrite them in English.
*Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
replace_script+="libs_package_archive_url=next(next(system['url'] for system in tool['systems'] if system['host'] == 'x86_64-pc-linux-gnu') for tool in package_data['packages'][0]['tools'] if tool['name'] == 'esp32-arduino-libs');"
sed 's/tools.esp32-arduino-libs.path={runtime.platform.path}\/tools\/esp32-arduino-libs/tools.esp32-arduino-libs.path=\{runtime.tools.esp32-arduino-libs.path\}/g'|\
sed 's/tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g'|\
sed 's/tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g'|\
sed 's/tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g'|\
sed 's/tools.xtensa-esp-elf-gdb.path={runtime.platform.path}\/tools\/xtensa-esp-elf-gdb/tools.xtensa-esp-elf-gdb.path=\{runtime.tools.xtensa-esp-elf-gdb.path\}/g'|\
sed "s/tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\\/tools\\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\\{runtime.tools.$RVTC_NEW_NAME.path\\}/g"|\
sed 's/tools.riscv32-esp-elf-gdb.path={runtime.platform.path}\/tools\/riscv32-esp-elf-gdb/tools.riscv32-esp-elf-gdb.path=\{runtime.tools.riscv32-esp-elf-gdb.path\}/g'|\
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g'|\
sed 's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g'|\
sed 's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g'|\
sed 's/debug.server.openocd.scripts_dir.windows={runtime.platform.path}\\tools\\openocd-esp32\\share\\openocd\\scripts\\/debug.server.openocd.scripts_dir.windows=\{runtime.tools.openocd-esp32.path\}\\share\\openocd\\scripts\\/g'\
> "$PKG_DIR/platform.txt"
sed 's/tools\.esp32-arduino-libs\.path\.windows=.*//g'|\
sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g'|\
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g'|\
sed "s/{runtime\.platform\.path}.tools.xtensa-esp-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g"|\
sed 's/{runtime\.platform\.path}.tools.riscv32-esp-elf-gdb/\{runtime.tools.riscv32-esp-elf-gdb.path\}/g'|\
sed "s/{runtime\.platform\.path}.tools.riscv32-esp-elf/\\{runtime.tools.$RVTC_NEW_NAME.path\\}/g"|\
sed 's/{runtime\.platform\.path}.tools.esptool/\{runtime.tools.esptool_py.path\}/g'|\
sed 's/{runtime\.platform\.path}.tools.openocd-esp32/\{runtime.tools.openocd-esp32.path\}/g' > "$PKG_DIR/platform.txt"
if[ -n "${VENDOR}"];then
# Append vendor name to platform.txt to create a separate section
sed -i "/^name=.*/s/$/ ($VENDOR)/""$PKG_DIR/platform.txt"
echo"ERROR: Compilation failed with error code $exit_status"
exit"$exit_status"
fi
if[ -n "$log_compilation"];then
#Extract the program storage space and dynamic memory usage in bytes and percentage in separate variables from the output, just the value without the string
printf"\033[93mSkipping %s test for %s, platform: %s\033[0m\n""$sketchname""$target""$platform"
printf"\n\n\n"
return0
fi
fi
if[ ! -f "$sdkconfig_path"];then
printf"\033[93mSketch %s build not found in %s\nMight be due to missing target requirements or build failure\033[0m\n""$(dirname "$sdkconfig_path")""$sketchname"
# Disable shellcheck warning about using 'cat' to read a file.
# shellcheck disable=SC2002
# For reference: add tools for all boards by replacing one line in each board
# "[board].upload.tool=esptool_py" to "[board].upload.tool=esptool_py\n[board].upload.tool.default=esptool_py\n[board].upload.tool.network=esp_ota"
#cat boards.txt | sed "s/\([a-zA-Z0-9_\-]*\)\.upload\.tool\=esptool_py/\1\.upload\.tool\=esptool_py\\n\1\.upload\.tool\.default\=esptool_py\\n\1\.upload\.tool\.network\=esp_ota/"
### Need help or have a question? Join the chat at [Gitter](https://gitter.im/espressif/arduino-esp32) or [open a new Discussion](https://github.com/espressif/arduino-esp32/discussions)
### Need help or have a question? Join the chat at [Discord](https://discord.gg/8xY6e9crwv) or [open a new Discussion](https://github.com/espressif/arduino-esp32/discussions)
@ -37,6 +49,10 @@ You can use the [Arduino-ESP32 Online Documentation](https://docs.espressif.com/
---
**APIs compatibility with ESP8266 and Arduino-CORE (Arduino.cc) is explained [here](https://docs.espressif.com/projects/arduino-esp32/en/latest/libraries.html#apis).**
| ESP32-C6 | No | Yes | [ESP32-C6](https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf) |
| ESP32-H2 | No | Yes | [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) |
> [!NOTE]
> ESP32-C2 is also supported by Arduino-ESP32 but requires using Arduino as an ESP-IDF component or rebuilding the static libraries.
> For more information, see the [Arduino as an ESP-IDF component documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/esp-idf_component.html) or the
For more details visit the [supported chips](https://docs.espressif.com/projects/arduino-esp32/en/latest/getting_started.html#supported-soc-s) documentation page.
@ -65,7 +87,7 @@ You can use [EspExceptionDecoder](https://github.com/me-no-dev/EspExceptionDecod
### 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](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue+label%3A%22Type%3A+For+reference%22+).
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 labeled as [Type: For reference](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue+label%3A%22Type%3A+For+reference%22+).
Finally, if you are sure no one else had the issue, follow the **Issue template** or **Feature request template** while reporting any [new Issue](https://github.com/espressif/arduino-esp32/issues/new/choose).
// setRxTimeout sets the timeout after which onReceive callback will be called (after receiving data, it waits for this time of UART rx inactivity to call the callback fnc)
// param symbols_timeout defines a timeout threshold in uart symbol periods. Setting 0 symbol timeout disables the callback call by timeout.
// Maximum timeout setting is calculacted automatically by IDF. If set above the maximum, it is ignored and an error is printed on Serial0 (check console).
// Examples: Maximum for 11 bits symbol is 92 (SERIAL_8N2, SERIAL_8E1, SERIAL_8O1, etc), Maximum for 10 bits symbol is 101 (SERIAL_8N1).
// For example symbols_timeout=1 defines a timeout equal to transmission time of one symbol (~11 bit) on current baudrate.
// For a baudrate of 9600, SERIAL_8N1 (10 bit symbol) and symbols_timeout = 3, the timeout would be 3 / (9600 / 10) = 3.125 ms
boolsetRxTimeout(uint8_tsymbols_timeout);
// setRxTimeout sets the timeout after which onReceive callback will be called (after receiving data, it waits for this time of UART rx inactivity to call the callback fnc)
// param symbols_timeout defines a timeout threshold in uart symbol periods. Setting 0 symbol timeout disables the callback call by timeout.
// Maximum timeout setting is calculacted automatically by IDF. If set above the maximum, it is ignored and an error is printed on Serial0 (check console).
// Examples: Maximum for 11 bits symbol is 92 (SERIAL_8N2, SERIAL_8E1, SERIAL_8O1, etc), Maximum for 10 bits symbol is 101 (SERIAL_8N1).
// For example symbols_timeout=1 defines a timeout equal to transmission time of one symbol (~11 bit) on current baudrate.
// For a baudrate of 9600, SERIAL_8N1 (10 bit symbol) and symbols_timeout = 3, the timeout would be 3 / (9600 / 10) = 3.125 ms
boolsetRxTimeout(uint8_tsymbols_timeout);
// setRxFIFOFull(uint8_t fifoBytes) will set the number of bytes that will trigger UART_INTR_RXFIFO_FULL interrupt and fill up RxRingBuffer
// This affects some functions such as Serial::available() and Serial.read() because, in a UART flow of receiving data, Serial internal
// RxRingBuffer will be filled only after these number of bytes arrive or a RX Timeout happens.
// This parameter can be set to 1 in order to receive byte by byte, but it will also consume more CPU time as the ISR will be activates often.
boolsetRxFIFOFull(uint8_tfifoBytes);
// setRxFIFOFull(uint8_t fifoBytes) will set the number of bytes that will trigger UART_INTR_RXFIFO_FULL interrupt and fill up RxRingBuffer
// This affects some functions such as Serial::available() and Serial.read() because, in a UART flow of receiving data, Serial internal
// RxRingBuffer will be filled only after these number of bytes arrive or a RX Timeout happens.
// This parameter can be set to 1 in order to receive byte by byte, but it will also consume more CPU time as the ISR will be activates often.
boolsetRxFIFOFull(uint8_tfifoBytes);
// 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.