* 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().
* 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>
* 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>
* 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>
* 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>
* 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>
* 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.)
* 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.
* 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>
* 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
* 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>
* 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>