Commit graph

1808 commits

Author SHA1 Message Date
Limor "Ladyada" Fried
4a341c94aa
add two more feather S3s (#6881)
* add two more feather S3s

* fix hardware Serial1 on feather v2
2022-06-27 14:01:31 +03:00
Rotzbua
95a45ce259
Doc: Update deprecation of setAutoConnect, etc.. (#6908)
* Doc: Update deprecation of `setAutoConnect`...

... and `getAutoConnect`

* Doc: Add doc to `setAutoReconnect`..

.. and `getAutoReconnect`
2022-06-27 14:01:00 +03:00
lbernstone
43e5e02224
Added maxOpenFiles to SDMMC (#6912) 2022-06-25 16:30:40 +03:00
Tomáš Pilný
097ff8b1f5
Implement simple RGB driver via digitalWrite; solving #6783 (#6808)
* Initial implementation of RGB driver via digitalWrite

* Moved constants to pins_arduino.h

* Changed pin definition + added example

* Wrapped BlinkRGB in #ifdef BOARD_HAS_NEOPIXEL

* Removed forgotten log from example

* Moved RGBLedWrite to new file esp32-hal-rgb-led and created pinMode in variatn.cpp

* Updated example - lowered single channel brightness to LED_BRIGHTNESS

* Changed function name from RGBLedWrite to neopixelWrite + code polishing

* Moved pinSetup portion related to RGB back to common file
2022-06-24 14:04:03 +03:00
Luc
f3763164cb
WireMaster example clarity (#6844)
- Created new temporary variable, stopping confusion with the reuse of "error". As Wire.requestFrom() doesn't return an error.
- Added a cast to help clarify when and why bytes are being read
2022-06-24 14:01:11 +03:00
Rotzbua
53698aeff6
Doc: update wifi encryption description (#6880)
By default `WPA2` is minimum required. The old insecure encryption must be explicitly enabled.
2022-06-24 14:00:44 +03:00
Valerii Koval
cf5fff8382
Refactor PlatformIO build scripts (#6887) 2022-06-24 13:57:16 +03:00
Rodrigo Garcia
3e297029e3
fixes BLE and WiFi Debug log messages (#6902) 2022-06-24 13:53:33 +03:00
Tomáš Pilný
29b8c873c0
Fixing Tone (#6898) 2022-06-24 13:52:29 +03:00
Rodrigo Garcia
e1b56fca0a
Fixes reading BLE Remote Descriptor (#6903) 2022-06-24 13:52:08 +03:00
Rotzbua
9ab81837a2
[WiFi] Clarify arduino wifi debug output (#6907)
PSK can concern different ciphers. Make it clear that it belongs to WPA.
2022-06-24 13:50:40 +03:00
Pedro Minatel
bd83727cd7
[DOCS] Added USB DFU and CDC tools guide (#6756)
* USB CDC and DFU docs

* Added DFU and CDC guide for flashing

* Added tools menu reference guide

* Deleted unrelated file to this PR

The file was added by mistake.

* Small fix in the Serial.begin mention

* Added a not for USB CDC isntead of DFU

* PR review changes
2022-06-16 13:42:01 +03:00
Rodrigo Garcia
3d2c056665
fixes BLE HID Battery Level Indicator (#6864)
* fixes BLE HID Battery Level Indicator

* Fixing identation
2022-06-16 13:40:43 +03:00
patricklaf
3877145b90
Feature/aw2eth (#6829)
* Create pins_arduino.h

* Update boards.txt
2022-06-13 11:08:24 +03:00
Rotzbua
e909172843
[WiFiSTA] Remove duplicate setting of SSID and password. (#6825)
Done by function call of `wifi_sta_config`.
2022-06-13 01:53:08 +03:00
fealy
2db7ded9a2
changed the board name Seeed XIAO wifi to XIAO esp32c3 (#6826)
* changed the board name as XIAO ESP32C3
2022-06-13 01:50:28 +03:00
alanmaxwell
7991110cc0
wifi: fix esp32 dual antenna issue (#6841) 2022-06-13 01:47:50 +03:00
Earle F. Philhower, III
0480112a15
Hide get.py download percent when not interactive (#6852)
When get.py is run in a script the percent-update printouts shown while
downloading the toolchain end up as 100s to 1000s of lines in log files.

When stdout is not a terminal, avoid printing these percentages and
shrink logfiles significantly.  Errors/etc. are still reported as normal.
2022-06-13 01:46:17 +03:00
Me No Dev
99520f66f6
Fix fail to set single byte that contains the slave address (#6840)
Checking here really does not work when called from within `onRequest`
2022-06-07 04:50:33 +03:00
Pedro Minatel
33011ede30
[DOCS] Added partition table tutorial (#6758)
* Added partition table guide

* Using a custom partition file

* Added some more examples for partitions

* Fixed the app partition offset

* Added bare_minimum_2MB partition table file

* PR review changes
2022-05-30 13:47:53 +03:00
Ha Thach
f3e416217d
update adafruit boards tinyuf2 and partition scheme (#6770)
- add tinyuf2 suffix to variant bootloader, cvs
- also update adafruit esp32s3 menu to match latest esp32s3dev one
2022-05-30 13:46:51 +03:00
Marc-Antoine Lalonde
0efa90df6e
Add support for Connaxio's Espoir (#6822)
Description of Change

This PR adds support for Espoir, a mikroBUS PoE+ devboard, by Connaxio inc. However, the ESP32-MINI-1 is a single core CPU, so Connaxio will provide the builds for its devboard until single core CPUs are officially supported. Adding these modifications to the official repository will limit discrepancies between Connaxio's fork and the main repo.

Tests scenarios

Tests include Ethernet, SPI, USB, I2C, UART (1-wire).

More info: https://www.connaxio.com/electronics/espoir/
2022-05-30 11:58:43 +03:00
Michael Ammann
548412952b
CTS / RTS pins were swapped in this API (#6816)
espressif/esp-idf / components/driver/include/driver/uart.h defines the API:
esp_err_t uart_set_pin(uart_port_t uart_num, int tx_io_num, int rx_io_num, int **rts_io_num**, int **cts_io_num**);
uartSetPins uses that api but alls it with swapped CTS/RTS pins as its API uses a different pin ordering: 
uart_set_pin(uart->num, txPin, rxPin, **ctsPin**, **rtsPin**); 

This fixes the wrong order in the function uartSetPins
2022-05-28 01:15:53 +03:00
Maximilian Gerhardt
3e8f7fe8d4
PlatformIO: Fix linking to make initVariant() work (#6809) 2022-05-27 13:35:32 +03:00
Maximilian Gerhardt
832c08e9fb
Remove nonexisting folder from include path (#6798) 2022-05-27 13:33:15 +03:00
Earle F. Philhower, III
99ba0e1cc5
Remove -Wextra warnings (#6782)
When building the core with `-Wextra` a few locations have `case:`
fall throughs or skipped field initializers.

Add proper comments for B64 cases to avoid GCC warnings

Initialized unused fields in Tone and WiFiGeneric to avoid missing
field initializer warnings.

````
2022-05-19T17:40:42.2280300Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cdecode.c: In function 'base64_decode_block_signed':
2022-05-19T17:40:42.2282122Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cdecode.c:42:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
2022-05-19T17:40:42.2283247Z          *plainchar    = (fragment & 0x03f) << 2;
2022-05-19T17:40:42.2284240Z          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-19T17:40:42.2285087Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cdecode.c:43:7: note: here
2022-05-19T17:40:42.2285435Z        case step_b:
2022-05-19T17:40:42.2285691Z        ^~~~
2022-05-19T17:40:42.2286515Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cdecode.c:53:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
2022-05-19T17:40:42.2286932Z          *plainchar    = (fragment & 0x00f) << 4;
2022-05-19T17:40:42.2287219Z          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-19T17:40:42.2287609Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cdecode.c:54:7: note: here
2022-05-19T17:40:42.2287909Z        case step_c:
2022-05-19T17:40:42.2288200Z        ^~~~
2022-05-19T17:40:42.2288972Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cdecode.c:64:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
2022-05-19T17:40:42.2289491Z          *plainchar    = (fragment & 0x003) << 6;
2022-05-19T17:40:42.2289745Z          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-19T17:40:42.2290162Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cdecode.c:65:7: note: here
2022-05-19T17:40:42.2290509Z        case step_d:
2022-05-19T17:40:42.2290714Z        ^~~~
2022-05-19T17:40:42.2482744Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cencode.c: In function 'base64_encode_block':
2022-05-19T17:40:42.2484713Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cencode.c:46:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
2022-05-19T17:40:42.2485415Z              result = (fragment & 0x003) << 4;
2022-05-19T17:40:42.2486713Z              ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-19T17:40:42.2487696Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cencode.c:47:9: note: here
2022-05-19T17:40:42.2488519Z          case step_B:
2022-05-19T17:40:42.2489175Z          ^~~~
2022-05-19T17:40:42.2492458Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cencode.c:56:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
2022-05-19T17:40:42.2493351Z              result = (fragment & 0x00f) << 2;
2022-05-19T17:40:42.2494227Z              ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-19T17:40:42.2496324Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/libb64/cencode.c:57:9: note: here
2022-05-19T17:40:42.2496937Z          case step_C:
2022-05-19T17:40:42.2497261Z          ^~~~
2022-05-19T17:40:44.6354962Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp: In function 'void setToneChannel(uint8_t)':
2022-05-19T17:40:44.6356417Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp:99:5: warning: missing initializer for member 'tone_msg_t::pin' [-Wmissing-field-initializers]
2022-05-19T17:40:44.6357120Z      };
2022-05-19T17:40:44.6358732Z      ^
2022-05-19T17:40:44.6364470Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp:99:5: warning: missing initializer for member 'tone_msg_t::frequency' [-Wmissing-field-initializers]
2022-05-19T17:40:44.6367914Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp:99:5: warning: missing initializer for member 'tone_msg_t::duration' [-Wmissing-field-initializers]
2022-05-19T17:40:44.6372875Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp: In function 'void noTone(uint8_t)':
2022-05-19T17:40:44.6373943Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp:110:5: warning: missing initializer for member 'tone_msg_t::frequency' [-Wmissing-field-initializers]
2022-05-19T17:40:44.6375154Z      };
2022-05-19T17:40:44.6375825Z      ^
2022-05-19T17:40:44.6379852Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp:110:5: warning: missing initializer for member 'tone_msg_t::duration' [-Wmissing-field-initializers]
2022-05-19T17:40:44.6383291Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp:110:5: warning: missing initializer for member 'tone_msg_t::channel' [-Wmissing-field-initializers]
2022-05-19T17:40:44.6388688Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp: In function 'void tone(uint8_t, unsigned int, long unsigned int)':
2022-05-19T17:40:44.6389829Z /home/runner/arduino_ide/hardware/espressif/esp32/cores/esp32/Tone.cpp:128:5: warning: missing initializer for member 'tone_msg_t::channel' [-Wmissing-field-initializers]
2022-05-19T17:40:44.6390677Z      };
2022-05-19T17:40:44.6391420Z      ^
2022-05-19T17:42:00.6768353Z /home/runner/arduino_ide/hardware/espressif/esp32/libraries/WiFi/src/WiFiGeneric.cpp: In static member function 'static bool WiFiGenericClass::setDualAntennaConfig(uint8_t, uint8_t, wifi_rx_ant_t, wifi_tx_ant_t)':
2022-05-19T17:42:00.6769293Z /home/runner/arduino_ide/hardware/espressif/esp32/libraries/WiFi/src/WiFiGeneric.cpp:1333:5: warning: missing initializer for member 'wifi_ant_config_t::rx_ant_default' [-Wmissing-field-initializers]
2022-05-19T17:42:00.6769658Z      };
2022-05-19T17:42:00.6769824Z      ^
````
2022-05-27 12:39:00 +03:00
sonictl
d32d70dc0d
Update littlefsbuilder.py (#6774)
add a comment to make it clear, since platformIO still creating the `spiffs.bin` for filesystem image. The file name `spiffs.bin` is so much CONFUSING! it makes the user fill the LittleFS creating is fail.
2022-05-27 12:37:39 +03:00
Abdelatif Guettouche
6b93a6c21e
workflows/upload-idf-component.yml: Fix the wildcard. (#6771)
The asterisk needs to be quoted.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-05-27 12:36:52 +03:00
sweetlilmre
f9423ab83f
Fix timerAttachInterrupt() and timerDetachInterrupt() in esp32-hal-timer.c (#6763)
* Fix timerAttachInterrupt() and timerDetachInterrupt() for migration to IDF 4.4

* Fixing log messages as per request
2022-05-27 12:31:16 +03:00
Michael Ammann
e5913c36ea
reduce stack size requirement for this library by 4k my moving a buffer to heap. (#6745)
Better allocate the buffer for f_mkfs from the heap otherwise the stack requirement of this library is huge due to a work buffer allocated for f_mkfs in sdcard_mount. The work buffer is only needed if argument format_if_empty is set true (which is by default false). 
This change is quite important if you plan to use this library in a task. as now it increased the tasks stacks size by 4k, even this memory is never used if users are not aware of the large stack requirement during init this library may have other variables on stack that would have written memory outsides its range which can cause various side effects.

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-05-27 12:21:24 +03:00
h-actsafe
247bca8bda
BluetoothSerial : Re-set _isRemoteAddressSet to false if connect() fails. (#6728)
The internal _isRemoteAddressSet variable is set to true
when calling connect() functions. If connecting fails _isRemoteAddressSet
needs to be re-set to false, otherwise other functions, such as
discover() will fail without clear error messages.
2022-05-27 12:20:43 +03:00
Rotzbua
46a026a45d
Doc: remove specific mention of wifi encryption... (#6671)
... as availability depends on compilation parameters.
2022-05-27 12:19:16 +03:00
Jan Procházka
2cb664eeec
adc fixes and improvements (#6799)
Fixed channel / unit selection for ESP32C3 (has only 5 channels on 1 adc unit).

Removed unnecessary includes.

Fixed different attenuation on channels to be taken in care in __analogReadMilliVolt.

All chips in __analogReadMilliVolts now use adc characteristics + calculation from raw to voltage as ESP32 does.
2022-05-27 12:17:51 +03:00
Rodrigo Garcia
2cde553e17
adds verbose message for WPA3 (#6812) 2022-05-27 11:40:49 +03:00
Me No Dev
adb88d7bed
Update bootloaders with dont-append-digest (#6800)
Fixes inability to flash the bootloader with esptool 4.x on device with flash size different than the default
2022-05-25 19:01:55 +03:00
Me No Dev
1a7962ece8
Add option to skip image verification after OTA (#6779)
Fixes: https://github.com/espressif/arduino-esp32/issues/5871
2022-05-19 15:52:13 +03:00
Jan Procházka
2b67a4e68a
HW TEST - Timer (#6754)
* Added HW timer unit test

* Adde setUp and tearDown functions
2022-05-18 11:25:36 +03:00
Rodrigo Garcia
722c4641c4
Extends String to print 64-bit integers (#6768) 2022-05-18 11:24:03 +03:00
Rodrigo Garcia
ba6e82c30d
Adds DHCP Range Setup to APMode (#6731)
* Adds DHCP Range Setup to APMode

* ready for supporting any netmask in DHCP server
2022-05-16 20:58:02 +03:00
Abdelatif Guettouche
ad14258d2c
workflows/hil.yml: Don't run the scheduled HIL workflow on forks. (#6753)
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-05-16 20:56:31 +03:00
Gonzalo Brusco
ed33e15752
Adjustable Serial Event Task Stack Size And Priority (#6685)
* Adjustable Serial Event Task Stack Size And Priority

* Added options to Kconfig

* Added Core Affinity

* Added CONFIG_FREERTOS_UNICORE

* Removed _CONFIG from FREERTOS_UNICORE

* Fixing Core choice for OnReceive() 

Makes it alligned to changes in #6718
Also eliminates conflict with #6718 for merging

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2022-05-13 13:57:13 +03:00
Me No Dev
5482315036
Change SPI::transfer signature to match official Arduino API (#6734) 2022-05-13 13:19:47 +03:00
Me No Dev
09c0a39d2a
Update Kconfig to autoselect the proper running core (#6718)
* Update Kconfig to autoselect the proper cunning core

* Always run UDP on Core0 by default
2022-05-13 13:15:06 +03:00
fealy
a9d77ac66e
Add new board XIAO_WIFI (#6702)
* Add new board XIAO_WIFI
2022-05-11 13:06:59 +03:00
David McCurley
14156d8071
Bugfix WiFiGeneric - SoftAP DHCPServer Corrupt Log Entry (#6719)
Fixes corrupt log entry printed by SoftAP DHCPServer.  Converts String() to expected cstr format.
2022-05-11 13:05:45 +03:00
lbernstone
b42b20850b
Added overload on send to cleanly handle char arrays (#6721) 2022-05-11 13:01:11 +03:00
Michael Ammann
edd2bd2dab
Add support for NINA-W106 with bigger flash size (#6722)
NINA-W106-00B : 32Mb / 4MB
NINA-W106-10B : 16Mb / 8MB

older NINA-W101/W102 : had 16Mb / 2MB only
2022-05-11 12:59:08 +03:00
Rodrigo Garcia
1fed09bc74
Adds Arduino standard macro-functions (#6726)
* Adds Arduino standard functions

* Fixes round()

Adds Arduino basic math Macros with '_' prefix.
2022-05-11 12:57:50 +03:00
Me No Dev
49bdd5f053
Add 2.0.3 option to issue template 2022-05-10 19:43:21 +03:00
Kostis Anagnostopoulos
709029996f
fix: compiler warnings about printf-format for pointers in esp32-hal-cpu.c (#6705)
* fix(hal.cpu) compiler warn about printf-format for pointers >

warning was:
```
framework-arduinoespressif32/cores/esp32/esp32-hal-cpu.c:132:9: note: in expansion of macro 'log_e'
         log_e("not found func=%08X arg=%08X",cb,arg);
         ^~~~~
framework-arduinoespressif32/tools/sdk/esp32/include/log/include/esp_log.h:276:27: warning: format '%X' expects argument of type 'unsigned int', but argument 7 has type 'void *' [-Wformat=]

```

* fix(tone.cpp) compiler warn about printf-format for pointers >

format-str expected plain uint while `duration` is long-uint.

Warning was:
```
.../cores/esp32/esp32-hal-log.h:115:32: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
 #define log_d(format, ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, TAG, format, ##__VA_ARGS__);}while(0)
                                ^~~~~~~~~~~~~~~~~~~
.../cores/esp32/Tone.cpp:31:9: note: in expansion of macro 'log_d'
         log_d("Task received from queue TONE_START: _pin=%d, frequency=%u Hz, duration=%u ms", tone_msg.pin, tone_msg.frequency, tone_msg.duration);
         ^~~~~
.../tools/sdk/esp32/include/log/include/esp_log.h:276:27: warning: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'long unsigned int' [-Wformat=]
```
2022-05-09 23:40:44 +03:00