Compare commits

...

39 Commits

Author SHA1 Message Date
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
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
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
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
3e8f7fe8d4 PlatformIO: Fix linking to make initVariant() work (#6809) 2022-05-27 13:35:32 +03:00
832c08e9fb Remove nonexisting folder from include path (#6798) 2022-05-27 13:33:15 +03:00
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
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
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
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
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
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
46a026a45d Doc: remove specific mention of wifi encryption... (#6671)
... as availability depends on compilation parameters.
2022-05-27 12:19:16 +03:00
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
2cde553e17 adds verbose message for WPA3 (#6812) 2022-05-27 11:40:49 +03:00
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
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
2b67a4e68a HW TEST - Timer (#6754)
* Added HW timer unit test

* Adde setUp and tearDown functions
2022-05-18 11:25:36 +03:00
722c4641c4 Extends String to print 64-bit integers (#6768) 2022-05-18 11:24:03 +03:00
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
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
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
5482315036 Change SPI::transfer signature to match official Arduino API (#6734) 2022-05-13 13:19:47 +03:00
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
a9d77ac66e Add new board XIAO_WIFI (#6702)
* Add new board XIAO_WIFI
2022-05-11 13:06:59 +03:00
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
b42b20850b Added overload on send to cleanly handle char arrays (#6721) 2022-05-11 13:01:11 +03:00
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
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
49bdd5f053 Add 2.0.3 option to issue template 2022-05-10 19:43:21 +03:00
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
bdeef89cc6 fixing beginTransaction() thread safety (#6425) 2022-05-09 23:38:59 +03:00
ca77502ceb Added compiler.warning_flags to platform.txt; fixing #6118 (#6596)
Summary

Added compiler.warning_flags to all chips in platform.txt to reflect users setting of warning level output during compilation (set up in Arduino IDE preferences)

Impact

When a warning is set to none the compilation will no longer display warnings

Related links

Solves issue #6118
2022-05-09 23:17:12 +03:00
d302091267 Changed pinMode() default interrupt type DISABLED to previously set (#6695)
* Changed in pinMode() default  intr_type

pins default configuration has intr_type =  GPIO_INTR_DISABLE
With this implementation, it will set the intr_type to previously set intr_type. It will no longer disable interrupt, when pinmode is called multiple times on same pin with interrupt enabled.
2022-05-09 23:14:59 +03:00
5dc4226cc5 hil.yml: Run the Event-file job only when the PR is labeled or the (#6717)
Workflow is scheduled.

It looks like the depedency on the Test job was not enough and the Event
job was triggering even without the label.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-05-09 16:00:42 +03:00
85ec66a4e0 fixed timer_dev definition (#6716) 2022-05-09 16:00:09 +03:00
44beee2f2c Fixes DNS Server Memory Leak when deleted (#6707) 2022-05-09 15:59:24 +03:00
0b3f1a9fa9 Update core version 2022-05-04 18:55:21 +03:00
6707ceb63c Upload component to the registry on any tag (#6688)
upload-idf-component.yml action was only running for tags like v*, while in this project tags like 2.0.3 are used. With this change, the workflow will run for all tags.
2022-05-04 18:50:51 +03:00
136 changed files with 1614 additions and 507 deletions

View File

@ -41,6 +41,7 @@ body:
options: options:
- latest master (checkout manually) - latest master (checkout manually)
- latest development Release Candidate (RC-X) - latest development Release Candidate (RC-X)
- v2.0.3
- v2.0.2 - v2.0.2
- v2.0.1 - v2.0.1
- v2.0.0 - v2.0.0
@ -129,4 +130,4 @@ body:
description: You agree to check all the resources above before opening a new issue. description: You agree to check all the resources above before opening a new issue.
options: options:
- label: I confirm I have checked existing issues, online documentation and Troubleshooting guide. - label: I confirm I have checked existing issues, online documentation and Troubleshooting guide.
required: true required: true

View File

@ -18,7 +18,7 @@ jobs:
gen_chunks: gen_chunks:
if: | if: |
contains(github.event.pull_request.labels.*.name, 'hil_test') || contains(github.event.pull_request.labels.*.name, 'hil_test') ||
github.event_name == 'schedule' (github.event_name == 'schedule' && github.repository == 'espressif/arduino-esp32')
name: Generate Chunks matrix name: Generate Chunks matrix
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
@ -110,7 +110,9 @@ jobs:
event_file: event_file:
name: "Event File" name: "Event File"
if: ${{ always() }} if: |
contains(github.event.pull_request.labels.*.name, 'hil_test') ||
github.event_name == 'schedule'
needs: Test needs: Test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -2,7 +2,7 @@ name: Push components to https://components.espressif.com
on: on:
push: push:
tags: tags:
- v* - '*'
jobs: jobs:
upload_components: upload_components:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -95,6 +95,8 @@ set(LIBRARY_SRCS
libraries/RainMaker/src/RMakerParam.cpp libraries/RainMaker/src/RMakerParam.cpp
libraries/RainMaker/src/RMakerDevice.cpp libraries/RainMaker/src/RMakerDevice.cpp
libraries/RainMaker/src/RMakerType.cpp libraries/RainMaker/src/RMakerType.cpp
libraries/RainMaker/src/RMakerQR.cpp
libraries/RainMaker/src/RMakerUtils.cpp
libraries/SD_MMC/src/SD_MMC.cpp libraries/SD_MMC/src/SD_MMC.cpp
libraries/SD/src/SD.cpp libraries/SD/src/SD.cpp
libraries/SD/src/sd_diskio.cpp libraries/SD/src/sd_diskio.cpp

View File

@ -21,7 +21,8 @@ config AUTOSTART_ARDUINO
choice ARDUINO_RUNNING_CORE choice ARDUINO_RUNNING_CORE
bool "Core on which Arduino's setup() and loop() are running" bool "Core on which Arduino's setup() and loop() are running"
default ARDUINO_RUN_CORE1 default ARDUINO_RUN_CORE0 if FREERTOS_UNICORE
default ARDUINO_RUN_CORE1 if !FREERTOS_UNICORE
help help
Select on which core Arduino's setup() and loop() functions run Select on which core Arduino's setup() and loop() functions run
@ -29,8 +30,10 @@ choice ARDUINO_RUNNING_CORE
bool "CORE 0" bool "CORE 0"
config ARDUINO_RUN_CORE1 config ARDUINO_RUN_CORE1
bool "CORE 1" bool "CORE 1"
depends on !FREERTOS_UNICORE
config ARDUINO_RUN_NO_AFFINITY config ARDUINO_RUN_NO_AFFINITY
bool "BOTH" bool "BOTH"
depends on !FREERTOS_UNICORE
endchoice endchoice
@ -48,7 +51,8 @@ config ARDUINO_LOOP_STACK_SIZE
choice ARDUINO_EVENT_RUNNING_CORE choice ARDUINO_EVENT_RUNNING_CORE
bool "Core on which Arduino's event handler is running" bool "Core on which Arduino's event handler is running"
default ARDUINO_EVENT_RUN_CORE1 default ARDUINO_EVENT_RUN_CORE0 if FREERTOS_UNICORE
default ARDUINO_EVENT_RUN_CORE1 if !FREERTOS_UNICORE
help help
Select on which core Arduino's WiFi.onEvent() run Select on which core Arduino's WiFi.onEvent() run
@ -56,8 +60,10 @@ choice ARDUINO_EVENT_RUNNING_CORE
bool "CORE 0" bool "CORE 0"
config ARDUINO_EVENT_RUN_CORE1 config ARDUINO_EVENT_RUN_CORE1
bool "CORE 1" bool "CORE 1"
depends on !FREERTOS_UNICORE
config ARDUINO_EVENT_RUN_NO_AFFINITY config ARDUINO_EVENT_RUN_NO_AFFINITY
bool "BOTH" bool "BOTH"
depends on !FREERTOS_UNICORE
endchoice endchoice
@ -67,9 +73,45 @@ config ARDUINO_EVENT_RUNNING_CORE
default 1 if ARDUINO_EVENT_RUN_CORE1 default 1 if ARDUINO_EVENT_RUN_CORE1
default -1 if ARDUINO_EVENT_RUN_NO_AFFINITY default -1 if ARDUINO_EVENT_RUN_NO_AFFINITY
choice ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE
bool "Core on which Arduino's Serial Event task is running"
default ARDUINO_SERIAL_EVENT_RUN_CORE0 if FREERTOS_UNICORE
default ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY if !FREERTOS_UNICORE
help
Select on which core Arduino's Serial Event task run
config ARDUINO_SERIAL_EVENT_RUN_CORE0
bool "CORE 0"
config ARDUINO_SERIAL_EVENT_RUN_CORE1
bool "CORE 1"
depends on !FREERTOS_UNICORE
config ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY
bool "BOTH"
depends on !FREERTOS_UNICORE
endchoice
config ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE
int
default 0 if ARDUINO_SERIAL_EVENT_RUN_CORE0
default 1 if ARDUINO_SERIAL_EVENT_RUN_CORE1
default -1 if ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY
config ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE
int "Serial Event task stack size"
default 2048
help
Amount of stack available for the Serial Event task.
config ARDUINO_SERIAL_EVENT_TASK_PRIORITY
int "Priority of the Serial Event task"
default 24
help
Select at what priority you want the Serial Event task to run.
choice ARDUINO_UDP_RUNNING_CORE choice ARDUINO_UDP_RUNNING_CORE
bool "Core on which Arduino's UDP is running" bool "Core on which Arduino's UDP is running"
default ARDUINO_UDP_RUN_CORE1 default ARDUINO_UDP_RUN_CORE0
help help
Select on which core Arduino's UDP run Select on which core Arduino's UDP run
@ -77,23 +119,25 @@ choice ARDUINO_UDP_RUNNING_CORE
bool "CORE 0" bool "CORE 0"
config ARDUINO_UDP_RUN_CORE1 config ARDUINO_UDP_RUN_CORE1
bool "CORE 1" bool "CORE 1"
depends on !FREERTOS_UNICORE
config ARDUINO_UDP_RUN_NO_AFFINITY config ARDUINO_UDP_RUN_NO_AFFINITY
bool "BOTH" bool "BOTH"
depends on !FREERTOS_UNICORE
endchoice endchoice
config ARDUINO_UDP_TASK_PRIORITY
int "Priority of the UDP task"
default 3
help
Select at what priority you want the UDP task to run.
config ARDUINO_UDP_RUNNING_CORE config ARDUINO_UDP_RUNNING_CORE
int int
default 0 if ARDUINO_UDP_RUN_CORE0 default 0 if ARDUINO_UDP_RUN_CORE0
default 1 if ARDUINO_UDP_RUN_CORE1 default 1 if ARDUINO_UDP_RUN_CORE1
default -1 if ARDUINO_UDP_RUN_NO_AFFINITY default -1 if ARDUINO_UDP_RUN_NO_AFFINITY
config ARDUINO_UDP_TASK_PRIORITY
int "Priority of the UDP task"
default 3
help
Select at what priority you want the UDP task to run.
config ARDUINO_ISR_IRAM config ARDUINO_ISR_IRAM
bool "Run interrupts in IRAM" bool "Run interrupts in IRAM"
default "n" default "n"
@ -356,3 +400,4 @@ config ARDUINO_SELECTIVE_Wire
endmenu endmenu

View File

@ -4314,6 +4314,28 @@ nina_w10.menu.UploadSpeed.460800.upload.speed=460800
nina_w10.menu.UploadSpeed.512000.windows=512000 nina_w10.menu.UploadSpeed.512000.windows=512000
nina_w10.menu.UploadSpeed.512000.upload.speed=512000 nina_w10.menu.UploadSpeed.512000.upload.speed=512000
nina_w10.menu.FlashSize.2M=2MB (16Mb, NINA-W101/W102)
nina_w10.menu.FlashSize.2M.build.flash_size=2MB
nina_w10.menu.FlashSize.4M=4MB (32Mb, NINA-W106-00B)
nina_w10.menu.FlashSize.4M.build.flash_size=4MB
nina_w10.menu.FlashSize.8M=8MB (64Mb, NINA-W106-10B)
nina_w10.menu.FlashSize.8M.build.flash_size=8MB
nina_w10.menu.FlashFreq.80=80MHz
nina_w10.menu.FlashFreq.80.build.flash_freq=80m
nina_w10.menu.FlashFreq.40=40MHz
nina_w10.menu.FlashFreq.40.build.flash_freq=40m
nina_w10.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
nina_w10.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
nina_w10.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
nina_w10.menu.PartitionScheme.default=Default (3MB No OTA/1MB SPIFFS)
nina_w10.menu.PartitionScheme.default.build.partitions=huge_app
nina_w10.menu.PartitionScheme.default.upload.maximum_size=3145728
nina_w10.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
nina_w10.menu.PartitionScheme.no_ota.build.partitions=no_ota
nina_w10.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
nina_w10.menu.DebugLevel.none=None nina_w10.menu.DebugLevel.none=None
nina_w10.menu.DebugLevel.none.build.code_debug=0 nina_w10.menu.DebugLevel.none.build.code_debug=0
nina_w10.menu.DebugLevel.error=Error nina_w10.menu.DebugLevel.error=Error
@ -5991,7 +6013,7 @@ adafruit_metro_esp32s2.upload.tool.network=esp_ota
adafruit_metro_esp32s2.upload.maximum_size=1310720 adafruit_metro_esp32s2.upload.maximum_size=1310720
adafruit_metro_esp32s2.upload.maximum_data_size=327680 adafruit_metro_esp32s2.upload.maximum_data_size=327680
adafruit_metro_esp32s2.upload.flags= adafruit_metro_esp32s2.upload.flags=
adafruit_metro_esp32s2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_metro_esp32s2.upload.extra_flags=
adafruit_metro_esp32s2.upload.use_1200bps_touch=true adafruit_metro_esp32s2.upload.use_1200bps_touch=true
adafruit_metro_esp32s2.upload.wait_for_upload_port=true adafruit_metro_esp32s2.upload.wait_for_upload_port=true
@ -6044,13 +6066,15 @@ adafruit_metro_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
adafruit_metro_esp32s2.menu.PSRAM.disabled=Disabled adafruit_metro_esp32s2.menu.PSRAM.disabled=Disabled
adafruit_metro_esp32s2.menu.PSRAM.disabled.build.defines= adafruit_metro_esp32s2.menu.PSRAM.disabled.build.defines=
adafruit_metro_esp32s2.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FFAT)
adafruit_metro_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_metro_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-4MB-tinyuf2
adafruit_metro_esp32s2.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792
adafruit_metro_esp32s2.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_metro_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_metro_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
adafruit_metro_esp32s2.menu.PartitionScheme.default.build.partitions=default adafruit_metro_esp32s2.menu.PartitionScheme.default.build.partitions=default
adafruit_metro_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_metro_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
adafruit_metro_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_metro_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
adafruit_metro_esp32s2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
adafruit_metro_esp32s2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_metro_esp32s2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_metro_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) adafruit_metro_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_metro_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal adafruit_metro_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_metro_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) adafruit_metro_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
@ -6071,12 +6095,6 @@ adafruit_metro_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_metro_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_metro_esp32s2.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_metro_esp32s2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_metro_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_metro_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_metro_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_metro_esp32s2.menu.CPUFreq.240=240MHz (WiFi) adafruit_metro_esp32s2.menu.CPUFreq.240=240MHz (WiFi)
adafruit_metro_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_metro_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L
@ -6168,7 +6186,7 @@ adafruit_magtag29_esp32s2.upload.tool.network=esp_ota
adafruit_magtag29_esp32s2.upload.maximum_size=1310720 adafruit_magtag29_esp32s2.upload.maximum_size=1310720
adafruit_magtag29_esp32s2.upload.maximum_data_size=327680 adafruit_magtag29_esp32s2.upload.maximum_data_size=327680
adafruit_magtag29_esp32s2.upload.flags= adafruit_magtag29_esp32s2.upload.flags=
adafruit_magtag29_esp32s2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_magtag29_esp32s2.upload.extra_flags=
adafruit_magtag29_esp32s2.upload.use_1200bps_touch=true adafruit_magtag29_esp32s2.upload.use_1200bps_touch=true
adafruit_magtag29_esp32s2.upload.wait_for_upload_port=true adafruit_magtag29_esp32s2.upload.wait_for_upload_port=true
@ -6221,13 +6239,15 @@ adafruit_magtag29_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
adafruit_magtag29_esp32s2.menu.PSRAM.disabled=Disabled adafruit_magtag29_esp32s2.menu.PSRAM.disabled=Disabled
adafruit_magtag29_esp32s2.menu.PSRAM.disabled.build.defines= adafruit_magtag29_esp32s2.menu.PSRAM.disabled.build.defines=
adafruit_magtag29_esp32s2.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FFAT)
adafruit_magtag29_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_magtag29_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-4MB-tinyuf2
adafruit_magtag29_esp32s2.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792
adafruit_magtag29_esp32s2.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_magtag29_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_magtag29_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
adafruit_magtag29_esp32s2.menu.PartitionScheme.default.build.partitions=default adafruit_magtag29_esp32s2.menu.PartitionScheme.default.build.partitions=default
adafruit_magtag29_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_magtag29_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
adafruit_magtag29_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_magtag29_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
adafruit_magtag29_esp32s2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
adafruit_magtag29_esp32s2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_magtag29_esp32s2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_magtag29_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) adafruit_magtag29_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_magtag29_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal adafruit_magtag29_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_magtag29_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) adafruit_magtag29_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
@ -6248,12 +6268,6 @@ adafruit_magtag29_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145
adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_magtag29_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_magtag29_esp32s2.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_magtag29_esp32s2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_magtag29_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_magtag29_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_magtag29_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_magtag29_esp32s2.menu.CPUFreq.240=240MHz (WiFi) adafruit_magtag29_esp32s2.menu.CPUFreq.240=240MHz (WiFi)
adafruit_magtag29_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_magtag29_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L
@ -6345,7 +6359,7 @@ adafruit_funhouse_esp32s2.upload.tool.network=esp_ota
adafruit_funhouse_esp32s2.upload.maximum_size=1310720 adafruit_funhouse_esp32s2.upload.maximum_size=1310720
adafruit_funhouse_esp32s2.upload.maximum_data_size=327680 adafruit_funhouse_esp32s2.upload.maximum_data_size=327680
adafruit_funhouse_esp32s2.upload.flags= adafruit_funhouse_esp32s2.upload.flags=
adafruit_funhouse_esp32s2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_funhouse_esp32s2.upload.extra_flags=
adafruit_funhouse_esp32s2.upload.use_1200bps_touch=true adafruit_funhouse_esp32s2.upload.use_1200bps_touch=true
adafruit_funhouse_esp32s2.upload.wait_for_upload_port=true adafruit_funhouse_esp32s2.upload.wait_for_upload_port=true
@ -6398,13 +6412,15 @@ adafruit_funhouse_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
adafruit_funhouse_esp32s2.menu.PSRAM.disabled=Disabled adafruit_funhouse_esp32s2.menu.PSRAM.disabled=Disabled
adafruit_funhouse_esp32s2.menu.PSRAM.disabled.build.defines= adafruit_funhouse_esp32s2.menu.PSRAM.disabled.build.defines=
adafruit_funhouse_esp32s2.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FFAT)
adafruit_funhouse_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_funhouse_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-4MB-tinyuf2
adafruit_funhouse_esp32s2.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792
adafruit_funhouse_esp32s2.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_funhouse_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_funhouse_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
adafruit_funhouse_esp32s2.menu.PartitionScheme.default.build.partitions=default adafruit_funhouse_esp32s2.menu.PartitionScheme.default.build.partitions=default
adafruit_funhouse_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_funhouse_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
adafruit_funhouse_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_funhouse_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
adafruit_funhouse_esp32s2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
adafruit_funhouse_esp32s2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_funhouse_esp32s2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_funhouse_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) adafruit_funhouse_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_funhouse_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal adafruit_funhouse_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_funhouse_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) adafruit_funhouse_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
@ -6425,12 +6441,6 @@ adafruit_funhouse_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145
adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_funhouse_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_funhouse_esp32s2.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_funhouse_esp32s2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_funhouse_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_funhouse_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_funhouse_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_funhouse_esp32s2.menu.CPUFreq.240=240MHz (WiFi) adafruit_funhouse_esp32s2.menu.CPUFreq.240=240MHz (WiFi)
adafruit_funhouse_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_funhouse_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L
@ -6522,7 +6532,7 @@ adafruit_feather_esp32s2.upload.tool.network=esp_ota
adafruit_feather_esp32s2.upload.maximum_size=1310720 adafruit_feather_esp32s2.upload.maximum_size=1310720
adafruit_feather_esp32s2.upload.maximum_data_size=327680 adafruit_feather_esp32s2.upload.maximum_data_size=327680
adafruit_feather_esp32s2.upload.flags= adafruit_feather_esp32s2.upload.flags=
adafruit_feather_esp32s2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_feather_esp32s2.upload.extra_flags=
adafruit_feather_esp32s2.upload.use_1200bps_touch=true adafruit_feather_esp32s2.upload.use_1200bps_touch=true
adafruit_feather_esp32s2.upload.wait_for_upload_port=true adafruit_feather_esp32s2.upload.wait_for_upload_port=true
@ -6575,13 +6585,15 @@ adafruit_feather_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
adafruit_feather_esp32s2.menu.PSRAM.disabled=Disabled adafruit_feather_esp32s2.menu.PSRAM.disabled=Disabled
adafruit_feather_esp32s2.menu.PSRAM.disabled.build.defines= adafruit_feather_esp32s2.menu.PSRAM.disabled.build.defines=
adafruit_feather_esp32s2.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FFAT)
adafruit_feather_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_feather_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-4MB-tinyuf2
adafruit_feather_esp32s2.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792
adafruit_feather_esp32s2.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_feather_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_feather_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
adafruit_feather_esp32s2.menu.PartitionScheme.default.build.partitions=default adafruit_feather_esp32s2.menu.PartitionScheme.default.build.partitions=default
adafruit_feather_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_feather_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
adafruit_feather_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_feather_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
adafruit_feather_esp32s2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
adafruit_feather_esp32s2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_feather_esp32s2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_feather_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) adafruit_feather_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_feather_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal adafruit_feather_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_feather_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) adafruit_feather_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
@ -6602,12 +6614,6 @@ adafruit_feather_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=31457
adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_feather_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_feather_esp32s2.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_feather_esp32s2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_feather_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_feather_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_feather_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_feather_esp32s2.menu.CPUFreq.240=240MHz (WiFi) adafruit_feather_esp32s2.menu.CPUFreq.240=240MHz (WiFi)
adafruit_feather_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_feather_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L
@ -6699,7 +6705,7 @@ adafruit_feather_esp32s2_tft.upload.tool.network=esp_ota
adafruit_feather_esp32s2_tft.upload.maximum_size=1310720 adafruit_feather_esp32s2_tft.upload.maximum_size=1310720
adafruit_feather_esp32s2_tft.upload.maximum_data_size=327680 adafruit_feather_esp32s2_tft.upload.maximum_data_size=327680
adafruit_feather_esp32s2_tft.upload.flags= adafruit_feather_esp32s2_tft.upload.flags=
adafruit_feather_esp32s2_tft.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_feather_esp32s2_tft.upload.extra_flags=
adafruit_feather_esp32s2_tft.upload.use_1200bps_touch=true adafruit_feather_esp32s2_tft.upload.use_1200bps_touch=true
adafruit_feather_esp32s2_tft.upload.wait_for_upload_port=true adafruit_feather_esp32s2_tft.upload.wait_for_upload_port=true
@ -6745,13 +6751,15 @@ adafruit_feather_esp32s2_tft.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
adafruit_feather_esp32s2_tft.menu.PSRAM.disabled=Disabled adafruit_feather_esp32s2_tft.menu.PSRAM.disabled=Disabled
adafruit_feather_esp32s2_tft.menu.PSRAM.disabled.build.defines= adafruit_feather_esp32s2_tft.menu.PSRAM.disabled.build.defines=
adafruit_feather_esp32s2_tft.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FFAT)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_feather_esp32s2_tft.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-4MB-tinyuf2
adafruit_feather_esp32s2_tft.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792
adafruit_feather_esp32s2_tft.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_feather_esp32s2_tft.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_feather_esp32s2_tft.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.default.build.partitions=default adafruit_feather_esp32s2_tft.menu.PartitionScheme.default.build.partitions=default
adafruit_feather_esp32s2_tft.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_feather_esp32s2_tft.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_feather_esp32s2_tft.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
adafruit_feather_esp32s2_tft.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_feather_esp32s2_tft.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_feather_esp32s2_tft.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) adafruit_feather_esp32s2_tft.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.minimal.build.partitions=minimal adafruit_feather_esp32s2_tft.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_feather_esp32s2_tft.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) adafruit_feather_esp32s2_tft.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
@ -6772,12 +6780,6 @@ adafruit_feather_esp32s2_tft.menu.PartitionScheme.huge_app.upload.maximum_size=3
adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_feather_esp32s2_tft.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_feather_esp32s2_tft.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_feather_esp32s2_tft.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_feather_esp32s2_tft.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_feather_esp32s2_tft.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_feather_esp32s2_tft.menu.CPUFreq.240=240MHz (WiFi) adafruit_feather_esp32s2_tft.menu.CPUFreq.240=240MHz (WiFi)
adafruit_feather_esp32s2_tft.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_feather_esp32s2_tft.menu.CPUFreq.240.build.f_cpu=240000000L
@ -6869,7 +6871,7 @@ adafruit_qtpy_esp32s2.upload.tool.network=esp_ota
adafruit_qtpy_esp32s2.upload.maximum_size=1310720 adafruit_qtpy_esp32s2.upload.maximum_size=1310720
adafruit_qtpy_esp32s2.upload.maximum_data_size=327680 adafruit_qtpy_esp32s2.upload.maximum_data_size=327680
adafruit_qtpy_esp32s2.upload.flags= adafruit_qtpy_esp32s2.upload.flags=
adafruit_qtpy_esp32s2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_qtpy_esp32s2.upload.extra_flags=
adafruit_qtpy_esp32s2.upload.use_1200bps_touch=true adafruit_qtpy_esp32s2.upload.use_1200bps_touch=true
adafruit_qtpy_esp32s2.upload.wait_for_upload_port=true adafruit_qtpy_esp32s2.upload.wait_for_upload_port=true
@ -6915,13 +6917,15 @@ adafruit_qtpy_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
adafruit_qtpy_esp32s2.menu.PSRAM.disabled=Disabled adafruit_qtpy_esp32s2.menu.PSRAM.disabled=Disabled
adafruit_qtpy_esp32s2.menu.PSRAM.disabled.build.defines= adafruit_qtpy_esp32s2.menu.PSRAM.disabled.build.defines=
adafruit_qtpy_esp32s2.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FFAT)
adafruit_qtpy_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_qtpy_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-4MB-tinyuf2
adafruit_qtpy_esp32s2.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792
adafruit_qtpy_esp32s2.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_qtpy_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_qtpy_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
adafruit_qtpy_esp32s2.menu.PartitionScheme.default.build.partitions=default adafruit_qtpy_esp32s2.menu.PartitionScheme.default.build.partitions=default
adafruit_qtpy_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_qtpy_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
adafruit_qtpy_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_qtpy_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
adafruit_qtpy_esp32s2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
adafruit_qtpy_esp32s2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_qtpy_esp32s2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_qtpy_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) adafruit_qtpy_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_qtpy_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal adafruit_qtpy_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_qtpy_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) adafruit_qtpy_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
@ -6942,12 +6946,6 @@ adafruit_qtpy_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_qtpy_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_qtpy_esp32s2.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_qtpy_esp32s2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_qtpy_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_qtpy_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_qtpy_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_qtpy_esp32s2.menu.CPUFreq.240=240MHz (WiFi) adafruit_qtpy_esp32s2.menu.CPUFreq.240=240MHz (WiFi)
adafruit_qtpy_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_qtpy_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L
@ -7156,6 +7154,7 @@ adafruit_qtpy_esp32c3.menu.DebugLevel.debug.build.code_debug=4
adafruit_qtpy_esp32c3.menu.DebugLevel.verbose=Verbose adafruit_qtpy_esp32c3.menu.DebugLevel.verbose=Verbose
adafruit_qtpy_esp32c3.menu.DebugLevel.verbose.build.code_debug=5 adafruit_qtpy_esp32c3.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
adafruit_qtpy_esp32_pico.name=Adafruit QT Py ESP32 adafruit_qtpy_esp32_pico.name=Adafruit QT Py ESP32
@ -7234,7 +7233,7 @@ adafruit_qtpy_esp32_pico.menu.DebugLevel.debug.build.code_debug=4
adafruit_qtpy_esp32_pico.menu.DebugLevel.verbose=Verbose adafruit_qtpy_esp32_pico.menu.DebugLevel.verbose=Verbose
adafruit_qtpy_esp32_pico.menu.DebugLevel.verbose.build.code_debug=5 adafruit_qtpy_esp32_pico.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
adafruit_feather_esp32_v2.name=Adafruit Feather ESP32 V2 adafruit_feather_esp32_v2.name=Adafruit Feather ESP32 V2
@ -7334,7 +7333,7 @@ adafruit_feather_esp32s3.upload.tool.network=esp_ota
adafruit_feather_esp32s3.upload.maximum_size=1310720 adafruit_feather_esp32s3.upload.maximum_size=1310720
adafruit_feather_esp32s3.upload.maximum_data_size=327680 adafruit_feather_esp32s3.upload.maximum_data_size=327680
adafruit_feather_esp32s3.upload.flags= adafruit_feather_esp32s3.upload.flags=
adafruit_feather_esp32s3.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_feather_esp32s3.upload.extra_flags=
adafruit_feather_esp32s3.upload.use_1200bps_touch=true adafruit_feather_esp32s3.upload.use_1200bps_touch=true
adafruit_feather_esp32s3.upload.wait_for_upload_port=true adafruit_feather_esp32s3.upload.wait_for_upload_port=true
@ -7360,17 +7359,51 @@ adafruit_feather_esp32s3.build.flash_mode=dio
adafruit_feather_esp32s3.build.boot=qio adafruit_feather_esp32s3.build.boot=qio
adafruit_feather_esp32s3.build.partitions=default adafruit_feather_esp32s3.build.partitions=default
adafruit_feather_esp32s3.build.defines= adafruit_feather_esp32s3.build.defines=
adafruit_feather_esp32s3.build.loop_core=-DARDUINO_RUNNING_CORE=1 adafruit_feather_esp32s3.build.loop_core=
adafruit_feather_esp32s3.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 adafruit_feather_esp32s3.build.event_core=
adafruit_feather_esp32s3.build.flash_type=qspi
adafruit_feather_esp32s3.build.psram_type=qspi
adafruit_feather_esp32s3.build.memory_type={build.flash_type}_{build.psram_type}
adafruit_feather_esp32s3.menu.USBMode.default=USB-OTG adafruit_feather_esp32s3.menu.FlashMode.qio=QIO 80MHz
adafruit_feather_esp32s3.menu.FlashMode.qio.build.flash_mode=dio
adafruit_feather_esp32s3.menu.FlashMode.qio.build.boot=qio
adafruit_feather_esp32s3.menu.FlashMode.qio.build.boot_freq=80m
adafruit_feather_esp32s3.menu.FlashMode.qio.build.flash_freq=80m
adafruit_feather_esp32s3.menu.FlashMode.qio.build.flash_type=qspi
adafruit_feather_esp32s3.menu.FlashMode.qio120=QIO 120MHz
adafruit_feather_esp32s3.menu.FlashMode.qio120.build.flash_mode=dio
adafruit_feather_esp32s3.menu.FlashMode.qio120.build.boot=qio
adafruit_feather_esp32s3.menu.FlashMode.qio120.build.boot_freq=120m
adafruit_feather_esp32s3.menu.FlashMode.qio120.build.flash_freq=80m
adafruit_feather_esp32s3.menu.FlashMode.qio120.build.flash_type=qspi
adafruit_feather_esp32s3.menu.FlashMode.dio=DIO 80MHz
adafruit_feather_esp32s3.menu.FlashMode.dio.build.flash_mode=dio
adafruit_feather_esp32s3.menu.FlashMode.dio.build.boot=dio
adafruit_feather_esp32s3.menu.FlashMode.dio.build.boot_freq=80m
adafruit_feather_esp32s3.menu.FlashMode.dio.build.flash_freq=80m
adafruit_feather_esp32s3.menu.FlashMode.dio.build.flash_type=qspi
adafruit_feather_esp32s3.menu.FlashMode.opi=OPI 80MHz
adafruit_feather_esp32s3.menu.FlashMode.opi.build.flash_mode=dout
adafruit_feather_esp32s3.menu.FlashMode.opi.build.boot=opi
adafruit_feather_esp32s3.menu.FlashMode.opi.build.boot_freq=80m
adafruit_feather_esp32s3.menu.FlashMode.opi.build.flash_freq=80m
adafruit_feather_esp32s3.menu.FlashMode.opi.build.flash_type=opi
adafruit_feather_esp32s3.menu.LoopCore.1=Core 1
adafruit_feather_esp32s3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
adafruit_feather_esp32s3.menu.LoopCore.0=Core 0
adafruit_feather_esp32s3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
adafruit_feather_esp32s3.menu.EventsCore.1=Core 1
adafruit_feather_esp32s3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
adafruit_feather_esp32s3.menu.EventsCore.0=Core 0
adafruit_feather_esp32s3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
adafruit_feather_esp32s3.menu.USBMode.default=USB-OTG (TinyUSB)
adafruit_feather_esp32s3.menu.USBMode.default.build.usb_mode=0 adafruit_feather_esp32s3.menu.USBMode.default.build.usb_mode=0
adafruit_feather_esp32s3.menu.USBMode.default.upload.use_1200bps_touch=true
adafruit_feather_esp32s3.menu.USBMode.default.upload.wait_for_upload_port=true
adafruit_feather_esp32s3.menu.USBMode.hwcdc=Hardware CDC and JTAG adafruit_feather_esp32s3.menu.USBMode.hwcdc=Hardware CDC and JTAG
adafruit_feather_esp32s3.menu.USBMode.hwcdc.build.usb_mode=1 adafruit_feather_esp32s3.menu.USBMode.hwcdc.build.usb_mode=1
adafruit_feather_esp32s3.menu.USBMode.hwcdc.upload.use_1200bps_touch=false
adafruit_feather_esp32s3.menu.USBMode.hwcdc.upload.wait_for_upload_port=false
adafruit_feather_esp32s3.menu.CDCOnBoot.cdc=Enabled adafruit_feather_esp32s3.menu.CDCOnBoot.cdc=Enabled
adafruit_feather_esp32s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 adafruit_feather_esp32s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
@ -7379,47 +7412,29 @@ adafruit_feather_esp32s3.menu.CDCOnBoot.default.build.cdc_on_boot=0
adafruit_feather_esp32s3.menu.MSCOnBoot.default=Disabled adafruit_feather_esp32s3.menu.MSCOnBoot.default=Disabled
adafruit_feather_esp32s3.menu.MSCOnBoot.default.build.msc_on_boot=0 adafruit_feather_esp32s3.menu.MSCOnBoot.default.build.msc_on_boot=0
adafruit_feather_esp32s3.menu.MSCOnBoot.msc=Enabled adafruit_feather_esp32s3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
adafruit_feather_esp32s3.menu.MSCOnBoot.msc.build.msc_on_boot=1 adafruit_feather_esp32s3.menu.MSCOnBoot.msc.build.msc_on_boot=1
adafruit_feather_esp32s3.menu.DFUOnBoot.default=Disabled adafruit_feather_esp32s3.menu.DFUOnBoot.default=Disabled
adafruit_feather_esp32s3.menu.DFUOnBoot.default.build.dfu_on_boot=0 adafruit_feather_esp32s3.menu.DFUOnBoot.default.build.dfu_on_boot=0
adafruit_feather_esp32s3.menu.DFUOnBoot.dfu=Enabled adafruit_feather_esp32s3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
adafruit_feather_esp32s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 adafruit_feather_esp32s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
adafruit_feather_esp32s3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_feather_esp32s3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
adafruit_feather_esp32s3.menu.PartitionScheme.default.build.partitions=default adafruit_feather_esp32s3.menu.UploadMode.cdc.upload.use_1200bps_touch=true
adafruit_feather_esp32s3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_feather_esp32s3.menu.UploadMode.cdc.upload.wait_for_upload_port=true
adafruit_feather_esp32s3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_feather_esp32s3.menu.UploadMode.default=UART0 / Hardware CDC
adafruit_feather_esp32s3.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT) adafruit_feather_esp32s3.menu.UploadMode.default.upload.use_1200bps_touch=false
adafruit_feather_esp32s3.menu.UploadMode.default.upload.wait_for_upload_port=false
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2=TinyUF2 8MB (2MB APP/3.6MB FFAT)
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-8MB-tinyuf2
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152
adafruit_feather_esp32s3.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_feather_esp32s3.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB SPIFFS)
adafruit_feather_esp32s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB adafruit_feather_esp32s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_feather_esp32s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 adafruit_feather_esp32s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_feather_esp32s3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_feather_esp32s3.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_feather_esp32s3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
adafruit_feather_esp32s3.menu.PartitionScheme.no_ota.build.partitions=no_ota
adafruit_feather_esp32s3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
adafruit_feather_esp32s3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
adafruit_feather_esp32s3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
adafruit_feather_esp32s3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
adafruit_feather_esp32s3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
adafruit_feather_esp32s3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
adafruit_feather_esp32s3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
adafruit_feather_esp32s3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
adafruit_feather_esp32s3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
adafruit_feather_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
adafruit_feather_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
adafruit_feather_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app
adafruit_feather_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
adafruit_feather_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_feather_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_feather_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_feather_esp32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_feather_esp32s3.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_feather_esp32s3.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_feather_esp32s3.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_feather_esp32s3.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_feather_esp32s3.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_feather_esp32s3.menu.CPUFreq.240=240MHz (WiFi) adafruit_feather_esp32s3.menu.CPUFreq.240=240MHz (WiFi)
adafruit_feather_esp32s3.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_feather_esp32s3.menu.CPUFreq.240.build.f_cpu=240000000L
@ -7434,11 +7449,6 @@ adafruit_feather_esp32s3.menu.CPUFreq.20.build.f_cpu=20000000L
adafruit_feather_esp32s3.menu.CPUFreq.10=10MHz adafruit_feather_esp32s3.menu.CPUFreq.10=10MHz
adafruit_feather_esp32s3.menu.CPUFreq.10.build.f_cpu=10000000L adafruit_feather_esp32s3.menu.CPUFreq.10.build.f_cpu=10000000L
adafruit_feather_esp32s3.menu.FlashFreq.80=80MHz
adafruit_feather_esp32s3.menu.FlashFreq.80.build.flash_freq=80m
adafruit_feather_esp32s3.menu.FlashFreq.40=40MHz
adafruit_feather_esp32s3.menu.FlashFreq.40.build.flash_freq=40m
adafruit_feather_esp32s3.menu.UploadSpeed.921600=921600 adafruit_feather_esp32s3.menu.UploadSpeed.921600=921600
adafruit_feather_esp32s3.menu.UploadSpeed.921600.upload.speed=921600 adafruit_feather_esp32s3.menu.UploadSpeed.921600.upload.speed=921600
adafruit_feather_esp32s3.menu.UploadSpeed.115200=115200 adafruit_feather_esp32s3.menu.UploadSpeed.115200=115200
@ -7488,7 +7498,7 @@ adafruit_qtpy_esp32s3.upload.tool.network=esp_ota
adafruit_qtpy_esp32s3.upload.maximum_size=1310720 adafruit_qtpy_esp32s3.upload.maximum_size=1310720
adafruit_qtpy_esp32s3.upload.maximum_data_size=327680 adafruit_qtpy_esp32s3.upload.maximum_data_size=327680
adafruit_qtpy_esp32s3.upload.flags= adafruit_qtpy_esp32s3.upload.flags=
adafruit_qtpy_esp32s3.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" adafruit_qtpy_esp32s3.upload.extra_flags=
adafruit_qtpy_esp32s3.upload.use_1200bps_touch=true adafruit_qtpy_esp32s3.upload.use_1200bps_touch=true
adafruit_qtpy_esp32s3.upload.wait_for_upload_port=true adafruit_qtpy_esp32s3.upload.wait_for_upload_port=true
adafruit_qtpy_esp32s3.upload.speed=921600 adafruit_qtpy_esp32s3.upload.speed=921600
@ -7515,17 +7525,51 @@ adafruit_qtpy_esp32s3.build.flash_mode=dio
adafruit_qtpy_esp32s3.build.boot=qio adafruit_qtpy_esp32s3.build.boot=qio
adafruit_qtpy_esp32s3.build.partitions=default_8MB adafruit_qtpy_esp32s3.build.partitions=default_8MB
adafruit_qtpy_esp32s3.build.defines= adafruit_qtpy_esp32s3.build.defines=
adafruit_qtpy_esp32s3.build.loop_core=-DARDUINO_RUNNING_CORE=1 adafruit_qtpy_esp32s3.build.loop_core=
adafruit_qtpy_esp32s3.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 adafruit_qtpy_esp32s3.build.event_core=
adafruit_qtpy_esp32s3.build.flash_type=qspi
adafruit_qtpy_esp32s3.build.psram_type=qspi
adafruit_qtpy_esp32s3.build.memory_type={build.flash_type}_{build.psram_type}
adafruit_qtpy_esp32s3.menu.USBMode.default=USB-OTG adafruit_qtpy_esp32s3.menu.FlashMode.qio=QIO 80MHz
adafruit_qtpy_esp32s3.menu.FlashMode.qio.build.flash_mode=dio
adafruit_qtpy_esp32s3.menu.FlashMode.qio.build.boot=qio
adafruit_qtpy_esp32s3.menu.FlashMode.qio.build.boot_freq=80m
adafruit_qtpy_esp32s3.menu.FlashMode.qio.build.flash_freq=80m
adafruit_qtpy_esp32s3.menu.FlashMode.qio.build.flash_type=qspi
adafruit_qtpy_esp32s3.menu.FlashMode.qio120=QIO 120MHz
adafruit_qtpy_esp32s3.menu.FlashMode.qio120.build.flash_mode=dio
adafruit_qtpy_esp32s3.menu.FlashMode.qio120.build.boot=qio
adafruit_qtpy_esp32s3.menu.FlashMode.qio120.build.boot_freq=120m
adafruit_qtpy_esp32s3.menu.FlashMode.qio120.build.flash_freq=80m
adafruit_qtpy_esp32s3.menu.FlashMode.qio120.build.flash_type=qspi
adafruit_qtpy_esp32s3.menu.FlashMode.dio=DIO 80MHz
adafruit_qtpy_esp32s3.menu.FlashMode.dio.build.flash_mode=dio
adafruit_qtpy_esp32s3.menu.FlashMode.dio.build.boot=dio
adafruit_qtpy_esp32s3.menu.FlashMode.dio.build.boot_freq=80m
adafruit_qtpy_esp32s3.menu.FlashMode.dio.build.flash_freq=80m
adafruit_qtpy_esp32s3.menu.FlashMode.dio.build.flash_type=qspi
adafruit_qtpy_esp32s3.menu.FlashMode.opi=OPI 80MHz
adafruit_qtpy_esp32s3.menu.FlashMode.opi.build.flash_mode=dout
adafruit_qtpy_esp32s3.menu.FlashMode.opi.build.boot=opi
adafruit_qtpy_esp32s3.menu.FlashMode.opi.build.boot_freq=80m
adafruit_qtpy_esp32s3.menu.FlashMode.opi.build.flash_freq=80m
adafruit_qtpy_esp32s3.menu.FlashMode.opi.build.flash_type=opi
adafruit_qtpy_esp32s3.menu.LoopCore.1=Core 1
adafruit_qtpy_esp32s3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
adafruit_qtpy_esp32s3.menu.LoopCore.0=Core 0
adafruit_qtpy_esp32s3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
adafruit_qtpy_esp32s3.menu.EventsCore.1=Core 1
adafruit_qtpy_esp32s3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
adafruit_qtpy_esp32s3.menu.EventsCore.0=Core 0
adafruit_qtpy_esp32s3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
adafruit_qtpy_esp32s3.menu.USBMode.default=USB-OTG (TinyUSB)
adafruit_qtpy_esp32s3.menu.USBMode.default.build.usb_mode=0 adafruit_qtpy_esp32s3.menu.USBMode.default.build.usb_mode=0
adafruit_qtpy_esp32s3.menu.USBMode.default.upload.use_1200bps_touch=true
adafruit_qtpy_esp32s3.menu.USBMode.default.upload.wait_for_upload_port=true
adafruit_qtpy_esp32s3.menu.USBMode.hwcdc=Hardware CDC and JTAG adafruit_qtpy_esp32s3.menu.USBMode.hwcdc=Hardware CDC and JTAG
adafruit_qtpy_esp32s3.menu.USBMode.hwcdc.build.usb_mode=1 adafruit_qtpy_esp32s3.menu.USBMode.hwcdc.build.usb_mode=1
adafruit_qtpy_esp32s3.menu.USBMode.hwcdc.upload.use_1200bps_touch=false
adafruit_qtpy_esp32s3.menu.USBMode.hwcdc.upload.wait_for_upload_port=false
adafruit_qtpy_esp32s3.menu.CDCOnBoot.cdc=Enabled adafruit_qtpy_esp32s3.menu.CDCOnBoot.cdc=Enabled
adafruit_qtpy_esp32s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 adafruit_qtpy_esp32s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
@ -7534,47 +7578,29 @@ adafruit_qtpy_esp32s3.menu.CDCOnBoot.default.build.cdc_on_boot=0
adafruit_qtpy_esp32s3.menu.MSCOnBoot.default=Disabled adafruit_qtpy_esp32s3.menu.MSCOnBoot.default=Disabled
adafruit_qtpy_esp32s3.menu.MSCOnBoot.default.build.msc_on_boot=0 adafruit_qtpy_esp32s3.menu.MSCOnBoot.default.build.msc_on_boot=0
adafruit_qtpy_esp32s3.menu.MSCOnBoot.msc=Enabled adafruit_qtpy_esp32s3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
adafruit_qtpy_esp32s3.menu.MSCOnBoot.msc.build.msc_on_boot=1 adafruit_qtpy_esp32s3.menu.MSCOnBoot.msc.build.msc_on_boot=1
adafruit_qtpy_esp32s3.menu.DFUOnBoot.default=Disabled adafruit_qtpy_esp32s3.menu.DFUOnBoot.default=Disabled
adafruit_qtpy_esp32s3.menu.DFUOnBoot.default.build.dfu_on_boot=0 adafruit_qtpy_esp32s3.menu.DFUOnBoot.default.build.dfu_on_boot=0
adafruit_qtpy_esp32s3.menu.DFUOnBoot.dfu=Enabled adafruit_qtpy_esp32s3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
adafruit_qtpy_esp32s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 adafruit_qtpy_esp32s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
adafruit_qtpy_esp32s3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) adafruit_qtpy_esp32s3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
adafruit_qtpy_esp32s3.menu.PartitionScheme.default.build.partitions=default adafruit_qtpy_esp32s3.menu.UploadMode.cdc.upload.use_1200bps_touch=true
adafruit_qtpy_esp32s3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) adafruit_qtpy_esp32s3.menu.UploadMode.cdc.upload.wait_for_upload_port=true
adafruit_qtpy_esp32s3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat adafruit_qtpy_esp32s3.menu.UploadMode.default=UART0 / Hardware CDC
adafruit_qtpy_esp32s3.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT) adafruit_qtpy_esp32s3.menu.UploadMode.default.upload.use_1200bps_touch=false
adafruit_qtpy_esp32s3.menu.UploadMode.default.upload.wait_for_upload_port=false
adafruit_qtpy_esp32s3.menu.PartitionScheme.tinyuf2=TinyUF2 8MB (2MB APP/3.6MB FFAT)
adafruit_qtpy_esp32s3.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
adafruit_qtpy_esp32s3.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-8MB-tinyuf2
adafruit_qtpy_esp32s3.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152
adafruit_qtpy_esp32s3.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
adafruit_qtpy_esp32s3.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB SPIFFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB adafruit_qtpy_esp32s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
adafruit_qtpy_esp32s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 adafruit_qtpy_esp32s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
adafruit_qtpy_esp32s3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_qtpy_esp32s3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.no_ota.build.partitions=no_ota
adafruit_qtpy_esp32s3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
adafruit_qtpy_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
adafruit_qtpy_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app
adafruit_qtpy_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
adafruit_qtpy_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_qtpy_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
adafruit_qtpy_esp32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
adafruit_qtpy_esp32s3.menu.PartitionScheme.fatflash.build.partitions=ffat
adafruit_qtpy_esp32s3.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
adafruit_qtpy_esp32s3.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
adafruit_qtpy_esp32s3.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
adafruit_qtpy_esp32s3.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
adafruit_qtpy_esp32s3.menu.CPUFreq.240=240MHz (WiFi) adafruit_qtpy_esp32s3.menu.CPUFreq.240=240MHz (WiFi)
adafruit_qtpy_esp32s3.menu.CPUFreq.240.build.f_cpu=240000000L adafruit_qtpy_esp32s3.menu.CPUFreq.240.build.f_cpu=240000000L
@ -7589,10 +7615,20 @@ adafruit_qtpy_esp32s3.menu.CPUFreq.20.build.f_cpu=20000000L
adafruit_qtpy_esp32s3.menu.CPUFreq.10=10MHz adafruit_qtpy_esp32s3.menu.CPUFreq.10=10MHz
adafruit_qtpy_esp32s3.menu.CPUFreq.10.build.f_cpu=10000000L adafruit_qtpy_esp32s3.menu.CPUFreq.10.build.f_cpu=10000000L
adafruit_qtpy_esp32s3.menu.FlashFreq.80=80MHz adafruit_qtpy_esp32s3.menu.UploadSpeed.921600=921600
adafruit_qtpy_esp32s3.menu.FlashFreq.80.build.flash_freq=80m adafruit_qtpy_esp32s3.menu.UploadSpeed.921600.upload.speed=921600
adafruit_qtpy_esp32s3.menu.FlashFreq.40=40MHz adafruit_qtpy_esp32s3.menu.UploadSpeed.115200=115200
adafruit_qtpy_esp32s3.menu.FlashFreq.40.build.flash_freq=40m adafruit_qtpy_esp32s3.menu.UploadSpeed.115200.upload.speed=115200
adafruit_qtpy_esp32s3.menu.UploadSpeed.256000.windows=256000
adafruit_qtpy_esp32s3.menu.UploadSpeed.256000.upload.speed=256000
adafruit_qtpy_esp32s3.menu.UploadSpeed.230400.windows.upload.speed=256000
adafruit_qtpy_esp32s3.menu.UploadSpeed.230400=230400
adafruit_qtpy_esp32s3.menu.UploadSpeed.230400.upload.speed=230400
adafruit_qtpy_esp32s3.menu.UploadSpeed.460800.linux=460800
adafruit_qtpy_esp32s3.menu.UploadSpeed.460800.macosx=460800
adafruit_qtpy_esp32s3.menu.UploadSpeed.460800.upload.speed=460800
adafruit_qtpy_esp32s3.menu.UploadSpeed.512000.windows=512000
adafruit_qtpy_esp32s3.menu.UploadSpeed.512000.upload.speed=512000
adafruit_qtpy_esp32s3.menu.DebugLevel.none=None adafruit_qtpy_esp32s3.menu.DebugLevel.none=None
adafruit_qtpy_esp32s3.menu.DebugLevel.none.build.code_debug=0 adafruit_qtpy_esp32s3.menu.DebugLevel.none.build.code_debug=0
@ -13159,7 +13195,7 @@ atmegazero_esp32s2.upload.tool.network=esp_ota
atmegazero_esp32s2.upload.maximum_size=1310720 atmegazero_esp32s2.upload.maximum_size=1310720
atmegazero_esp32s2.upload.maximum_data_size=327680 atmegazero_esp32s2.upload.maximum_data_size=327680
atmegazero_esp32s2.upload.flags= atmegazero_esp32s2.upload.flags=
atmegazero_esp32s2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" atmegazero_esp32s2.upload.extra_flags=
atmegazero_esp32s2.upload.use_1200bps_touch=true atmegazero_esp32s2.upload.use_1200bps_touch=true
atmegazero_esp32s2.upload.wait_for_upload_port=true atmegazero_esp32s2.upload.wait_for_upload_port=true
@ -13206,6 +13242,11 @@ atmegazero_esp32s2.menu.PSRAM.disabled.build.defines=
atmegazero_esp32s2.menu.PSRAM.enabled=Enabled atmegazero_esp32s2.menu.PSRAM.enabled=Enabled
atmegazero_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM atmegazero_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
atmegazero_esp32s2.menu.PartitionScheme.tinyuf2=TinyUF2 16MB (2MB APP/11.6MB FFAT)
atmegazero_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2
atmegazero_esp32s2.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-16MB-tinyuf2
atmegazero_esp32s2.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152
atmegazero_esp32s2.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
atmegazero_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) atmegazero_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
atmegazero_esp32s2.menu.PartitionScheme.default.build.partitions=default atmegazero_esp32s2.menu.PartitionScheme.default.build.partitions=default
atmegazero_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) atmegazero_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
@ -14375,3 +14416,266 @@ AirM2M_CORE_ESP32C3.menu.DebugLevel.verbose=Verbose
AirM2M_CORE_ESP32C3.menu.DebugLevel.verbose.build.code_debug=5 AirM2M_CORE_ESP32C3.menu.DebugLevel.verbose.build.code_debug=5
############################################################# #############################################################
SEEED_XIAO_WIFI.name=SEEED_XIAO_WIFI
SEEED_XIAO_WIFI.vid.0=0x2886
SEEED_XIAO_WIFI.pid.0=0x0047
SEEED_XIAO_WIFI.bootloader.tool=esptool_py
SEEED_XIAO_WIFI.bootloader.tool.default=esptool_py
SEEED_XIAO_WIFI.upload.tool=esptool_py
SEEED_XIAO_WIFI.upload.tool.default=esptool_py
SEEED_XIAO_WIFI.upload.tool.network=esp_ota
SEEED_XIAO_WIFI.upload.maximum_size=1310720
SEEED_XIAO_WIFI.upload.maximum_data_size=327680
SEEED_XIAO_WIFI.upload.flags=
SEEED_XIAO_WIFI.upload.extra_flags=
SEEED_XIAO_WIFI.upload.use_1200bps_touch=false
SEEED_XIAO_WIFI.upload.wait_for_upload_port=false
SEEED_XIAO_WIFI.serial.disableDTR=false
SEEED_XIAO_WIFI.serial.disableRTS=false
SEEED_XIAO_WIFI.build.tarch=riscv32
SEEED_XIAO_WIFI.build.target=esp
SEEED_XIAO_WIFI.build.mcu=esp32c3
SEEED_XIAO_WIFI.build.core=esp32
SEEED_XIAO_WIFI.build.variant=SEEED_XIAO_WIFI
SEEED_XIAO_WIFI.build.board=SEEED_XIAO_WIFI
SEEED_XIAO_WIFI.build.bootloader_addr=0x0
SEEED_XIAO_WIFI.build.cdc_on_boot=1
SEEED_XIAO_WIFI.build.f_cpu=160000000L
SEEED_XIAO_WIFI.build.flash_size=4MB
SEEED_XIAO_WIFI.build.flash_freq=80m
SEEED_XIAO_WIFI.build.flash_mode=qio
SEEED_XIAO_WIFI.build.boot=qio
SEEED_XIAO_WIFI.build.partitions=default
SEEED_XIAO_WIFI.build.defines=
SEEED_XIAO_WIFI.menu.CDCOnBoot.default=Enabled
SEEED_XIAO_WIFI.menu.CDCOnBoot.default.build.cdc_on_boot=1
SEEED_XIAO_WIFI.menu.CDCOnBoot.cdc=Disabled
SEEED_XIAO_WIFI.menu.CDCOnBoot.cdc.build.cdc_on_boot=0
SEEED_XIAO_WIFI.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.default.build.partitions=default
SEEED_XIAO_WIFI.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
SEEED_XIAO_WIFI.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
SEEED_XIAO_WIFI.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
SEEED_XIAO_WIFI.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
SEEED_XIAO_WIFI.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.minimal.build.partitions=minimal
SEEED_XIAO_WIFI.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.no_ota.build.partitions=no_ota
SEEED_XIAO_WIFI.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
SEEED_XIAO_WIFI.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
SEEED_XIAO_WIFI.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.huge_app.build.partitions=huge_app
SEEED_XIAO_WIFI.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
SEEED_XIAO_WIFI.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
SEEED_XIAO_WIFI.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
SEEED_XIAO_WIFI.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
SEEED_XIAO_WIFI.menu.PartitionScheme.fatflash.build.partitions=ffat
SEEED_XIAO_WIFI.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
SEEED_XIAO_WIFI.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
SEEED_XIAO_WIFI.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
SEEED_XIAO_WIFI.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
SEEED_XIAO_WIFI.menu.PartitionScheme.rainmaker=RainMaker
SEEED_XIAO_WIFI.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
SEEED_XIAO_WIFI.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
SEEED_XIAO_WIFI.menu.CPUFreq.160=160MHz (WiFi)
SEEED_XIAO_WIFI.menu.CPUFreq.160.build.f_cpu=160000000L
SEEED_XIAO_WIFI.menu.CPUFreq.80=80MHz (WiFi)
SEEED_XIAO_WIFI.menu.CPUFreq.80.build.f_cpu=80000000L
SEEED_XIAO_WIFI.menu.CPUFreq.40=40MHz
SEEED_XIAO_WIFI.menu.CPUFreq.40.build.f_cpu=40000000L
SEEED_XIAO_WIFI.menu.CPUFreq.20=20MHz
SEEED_XIAO_WIFI.menu.CPUFreq.20.build.f_cpu=20000000L
SEEED_XIAO_WIFI.menu.CPUFreq.10=10MHz
SEEED_XIAO_WIFI.menu.CPUFreq.10.build.f_cpu=10000000L
SEEED_XIAO_WIFI.menu.FlashMode.qio=QIO
SEEED_XIAO_WIFI.menu.FlashMode.qio.build.flash_mode=dio
SEEED_XIAO_WIFI.menu.FlashMode.qio.build.boot=qio
SEEED_XIAO_WIFI.menu.FlashMode.dio=DIO
SEEED_XIAO_WIFI.menu.FlashMode.dio.build.flash_mode=dio
SEEED_XIAO_WIFI.menu.FlashMode.dio.build.boot=dio
SEEED_XIAO_WIFI.menu.FlashMode.qout=QOUT
SEEED_XIAO_WIFI.menu.FlashMode.qout.build.flash_mode=dout
SEEED_XIAO_WIFI.menu.FlashMode.qout.build.boot=qout
SEEED_XIAO_WIFI.menu.FlashMode.dout=DOUT
SEEED_XIAO_WIFI.menu.FlashMode.dout.build.flash_mode=dout
SEEED_XIAO_WIFI.menu.FlashFreq.80=80MHz
SEEED_XIAO_WIFI.menu.FlashFreq.80.build.flash_freq=80m
SEEED_XIAO_WIFI.menu.FlashFreq.40=40MHz
SEEED_XIAO_WIFI.menu.FlashFreq.40.build.flash_freq=40m
SEEED_XIAO_WIFI.menu.FlashSize.4M=4MB (32Mb)
SEEED_XIAO_WIFI.menu.FlashSize.4M.build.flash_size=4MB
SEEED_XIAO_WIFI.menu.FlashSize.8M=8MB (64Mb)
SEEED_XIAO_WIFI.menu.FlashSize.8M.build.flash_size=8MB
SEEED_XIAO_WIFI.menu.FlashSize.8M.build.partitions=default_8MB
SEEED_XIAO_WIFI.menu.FlashSize.2M=2MB (16Mb)
SEEED_XIAO_WIFI.menu.FlashSize.2M.build.flash_size=2MB
SEEED_XIAO_WIFI.menu.FlashSize.2M.build.partitions=minimal
SEEED_XIAO_WIFI.menu.FlashSize.16M=16MB (128Mb)
SEEED_XIAO_WIFI.menu.FlashSize.16M.build.flash_size=16MB
SEEED_XIAO_WIFI.menu.UploadSpeed.921600=921600
SEEED_XIAO_WIFI.menu.UploadSpeed.921600.upload.speed=921600
SEEED_XIAO_WIFI.menu.UploadSpeed.115200=115200
SEEED_XIAO_WIFI.menu.UploadSpeed.115200.upload.speed=115200
SEEED_XIAO_WIFI.menu.UploadSpeed.256000.windows=256000
SEEED_XIAO_WIFI.menu.UploadSpeed.256000.upload.speed=256000
SEEED_XIAO_WIFI.menu.UploadSpeed.230400.windows.upload.speed=256000
SEEED_XIAO_WIFI.menu.UploadSpeed.230400=230400
SEEED_XIAO_WIFI.menu.UploadSpeed.230400.upload.speed=230400
SEEED_XIAO_WIFI.menu.UploadSpeed.460800.linux=460800
SEEED_XIAO_WIFI.menu.UploadSpeed.460800.macosx=460800
SEEED_XIAO_WIFI.menu.UploadSpeed.460800.upload.speed=460800
SEEED_XIAO_WIFI.menu.UploadSpeed.512000.windows=512000
SEEED_XIAO_WIFI.menu.UploadSpeed.512000.upload.speed=512000
SEEED_XIAO_WIFI.menu.DebugLevel.none=None
SEEED_XIAO_WIFI.menu.DebugLevel.none.build.code_debug=0
SEEED_XIAO_WIFI.menu.DebugLevel.error=Error
SEEED_XIAO_WIFI.menu.DebugLevel.error.build.code_debug=1
SEEED_XIAO_WIFI.menu.DebugLevel.warn=Warn
SEEED_XIAO_WIFI.menu.DebugLevel.warn.build.code_debug=2
SEEED_XIAO_WIFI.menu.DebugLevel.info=Info
SEEED_XIAO_WIFI.menu.DebugLevel.info.build.code_debug=3
SEEED_XIAO_WIFI.menu.DebugLevel.debug=Debug
SEEED_XIAO_WIFI.menu.DebugLevel.debug.build.code_debug=4
SEEED_XIAO_WIFI.menu.DebugLevel.verbose=Verbose
SEEED_XIAO_WIFI.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
connaxio_espoir.name=Connaxio's Espoir
connaxio_espoir.vid.0=0x10C4
connaxio_espoir.pid.0=0x8D9A
connaxio_espoir.bootloader.tool=esptool_py
connaxio_espoir.bootloader.tool.default=esptool_py
connaxio_espoir.upload.tool=esptool_py
connaxio_espoir.upload.tool.default=esptool_py
connaxio_espoir.upload.tool.network=esp_ota
connaxio_espoir.upload.maximum_size=1310720
connaxio_espoir.upload.maximum_data_size=327680
connaxio_espoir.upload.flags=
connaxio_espoir.upload.extra_flags=
connaxio_espoir.serial.disableDTR=true
connaxio_espoir.serial.disableRTS=true
connaxio_espoir.build.tarch=xtensa
connaxio_espoir.build.bootloader_addr=0x1000
connaxio_espoir.build.target=esp32
connaxio_espoir.build.mcu=esp32
connaxio_espoir.build.core=esp32
connaxio_espoir.build.variant=connaxio_espoir
connaxio_espoir.build.board=connaxio_espoir
connaxio_espoir.build.f_cpu=240000000L
connaxio_espoir.build.flash_size=4MB
connaxio_espoir.build.flash_freq=80m
connaxio_espoir.build.flash_mode=dio
connaxio_espoir.build.boot=dio
connaxio_espoir.build.partitions=default
connaxio_espoir.build.defines=
connaxio_espoir.build.loop_core=
connaxio_espoir.build.event_core=
connaxio_espoir.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
connaxio_espoir.menu.PartitionScheme.default.build.partitions=default
connaxio_espoir.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
connaxio_espoir.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
connaxio_espoir.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
connaxio_espoir.menu.PartitionScheme.minimal.build.partitions=minimal
connaxio_espoir.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
connaxio_espoir.menu.PartitionScheme.no_ota.build.partitions=no_ota
connaxio_espoir.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
connaxio_espoir.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
connaxio_espoir.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
connaxio_espoir.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
connaxio_espoir.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
connaxio_espoir.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
connaxio_espoir.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
connaxio_espoir.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
connaxio_espoir.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
connaxio_espoir.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
connaxio_espoir.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
connaxio_espoir.menu.PartitionScheme.huge_app.build.partitions=huge_app
connaxio_espoir.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
connaxio_espoir.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
connaxio_espoir.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
connaxio_espoir.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
connaxio_espoir.menu.PartitionScheme.rainmaker=RainMaker
connaxio_espoir.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
connaxio_espoir.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
connaxio_espoir.menu.CPUFreq.240=240MHz (WiFi/BT)
connaxio_espoir.menu.CPUFreq.240.build.f_cpu=240000000L
connaxio_espoir.menu.CPUFreq.160=160MHz (WiFi/BT)
connaxio_espoir.menu.CPUFreq.160.build.f_cpu=160000000L
connaxio_espoir.menu.CPUFreq.80=80MHz (WiFi/BT)
connaxio_espoir.menu.CPUFreq.80.build.f_cpu=80000000L
connaxio_espoir.menu.CPUFreq.40=40MHz
connaxio_espoir.menu.CPUFreq.40.build.f_cpu=40000000L
connaxio_espoir.menu.CPUFreq.20=20MHz
connaxio_espoir.menu.CPUFreq.20.build.f_cpu=20000000L
connaxio_espoir.menu.CPUFreq.10=10MHz
connaxio_espoir.menu.CPUFreq.10.build.f_cpu=10000000L
connaxio_espoir.menu.FlashFreq.80=80MHz
connaxio_espoir.menu.FlashFreq.80.build.flash_freq=80m
connaxio_espoir.menu.FlashFreq.40=40MHz
connaxio_espoir.menu.FlashFreq.40.build.flash_freq=40m
connaxio_espoir.menu.UploadSpeed.921600=921600
connaxio_espoir.menu.UploadSpeed.921600.upload.speed=921600
connaxio_espoir.menu.UploadSpeed.512000.windows=512000
connaxio_espoir.menu.UploadSpeed.512000.upload.speed=512000
connaxio_espoir.menu.UploadSpeed.460800.linux=460800
connaxio_espoir.menu.UploadSpeed.460800.macosx=460800
connaxio_espoir.menu.UploadSpeed.460800.upload.speed=460800
connaxio_espoir.menu.UploadSpeed.256000.windows=256000
connaxio_espoir.menu.UploadSpeed.256000.upload.speed=256000
connaxio_espoir.menu.UploadSpeed.230400.windows.upload.speed=256000
connaxio_espoir.menu.UploadSpeed.230400=230400
connaxio_espoir.menu.UploadSpeed.230400.upload.speed=230400
connaxio_espoir.menu.UploadSpeed.115200=115200
connaxio_espoir.menu.UploadSpeed.115200.upload.speed=115200
connaxio_espoir.menu.DebugLevel.none=None
connaxio_espoir.menu.DebugLevel.none.build.code_debug=0
connaxio_espoir.menu.DebugLevel.error=Error
connaxio_espoir.menu.DebugLevel.error.build.code_debug=1
connaxio_espoir.menu.DebugLevel.warn=Warn
connaxio_espoir.menu.DebugLevel.warn.build.code_debug=2
connaxio_espoir.menu.DebugLevel.info=Info
connaxio_espoir.menu.DebugLevel.info.build.code_debug=3
connaxio_espoir.menu.DebugLevel.debug=Debug
connaxio_espoir.menu.DebugLevel.debug.build.code_debug=4
connaxio_espoir.menu.DebugLevel.verbose=Verbose
connaxio_espoir.menu.DebugLevel.verbose.build.code_debug=5
##############################################################

View File

@ -69,7 +69,12 @@
#define __STRINGIFY(a) #a #define __STRINGIFY(a) #a
#endif #endif
// can't define max() / min() because of conflicts with C++
#define _min(a,b) ((a)<(b)?(a):(b))
#define _max(a,b) ((a)>(b)?(a):(b))
#define _abs(x) ((x)>0?(x):-(x)) // abs() comes from STL
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define _round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) // round() comes from STL
#define radians(deg) ((deg)*DEG_TO_RAD) #define radians(deg) ((deg)*DEG_TO_RAD)
#define degrees(rad) ((rad)*RAD_TO_DEG) #define degrees(rad) ((rad)*RAD_TO_DEG)
#define sq(x) ((x)*(x)) #define sq(x) ((x)*(x))
@ -89,6 +94,7 @@
#define bitRead(value, bit) (((value) >> (bit)) & 0x01) #define bitRead(value, bit) (((value) >> (bit)) & 0x01)
#define bitSet(value, bit) ((value) |= (1UL << (bit))) #define bitSet(value, bit) ((value) |= (1UL << (bit)))
#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) #define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
#define bitToggle(value, bit) ((value) ^= (1UL << (bit)))
#define bitWrite(value, bit, bitvalue) ((bitvalue) ? bitSet(value, bit) : bitClear(value, bit)) #define bitWrite(value, bit, bitvalue) ((bitvalue) ? bitSet(value, bit) : bitClear(value, bit))
// avr-libc defines _NOP() since 1.6.2 // avr-libc defines _NOP() since 1.6.2
@ -168,12 +174,13 @@ void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val);
#include "Esp.h" #include "Esp.h"
#include "esp32/spiram.h" #include "esp32/spiram.h"
// Use float-compatible stl abs() and round(), we don't use Arduino macros to avoid issues with the C++ libraries
using std::abs; using std::abs;
using std::isinf; using std::isinf;
using std::isnan; using std::isnan;
using std::max; using std::max;
using std::min; using std::min;
using ::round; using std::round;
uint16_t makeWord(uint16_t w); uint16_t makeWord(uint16_t w);
uint16_t makeWord(uint8_t h, uint8_t l); uint16_t makeWord(uint8_t h, uint8_t l);
@ -203,9 +210,6 @@ void noTone(uint8_t _pin);
long random(long); long random(long);
#endif /* __cplusplus */ #endif /* __cplusplus */
#define _min(a,b) ((a)<(b)?(a):(b))
#define _max(a,b) ((a)>(b)?(a):(b))
#include "pins_arduino.h" #include "pins_arduino.h"
#endif /* _ESP32_CORE_ARDUINO_H_ */ #endif /* _ESP32_CORE_ARDUINO_H_ */

View File

@ -9,6 +9,18 @@
#include "driver/uart.h" #include "driver/uart.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#ifndef ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE
#define ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE 2048
#endif
#ifndef ARDUINO_SERIAL_EVENT_TASK_PRIORITY
#define ARDUINO_SERIAL_EVENT_TASK_PRIORITY (configMAX_PRIORITIES-1)
#endif
#ifndef ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE
#define ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE -1
#endif
#ifndef SOC_RX0 #ifndef SOC_RX0
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#define SOC_RX0 3 #define SOC_RX0 3
@ -159,7 +171,7 @@ HardwareSerial::~HardwareSerial()
void HardwareSerial::_createEventTask(void *args) void HardwareSerial::_createEventTask(void *args)
{ {
// Creating UART event Task // Creating UART event Task
xTaskCreate(_uartEventTask, "uart_event_task", 2048, this, configMAX_PRIORITIES - 1, &_eventTask); xTaskCreateUniversal(_uartEventTask, "uart_event_task", ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE, this, ARDUINO_SERIAL_EVENT_TASK_PRIORITY, &_eventTask, ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE);
if (_eventTask == NULL) { if (_eventTask == NULL) {
log_e(" -- UART%d Event Task not Created!", _uart_nr); log_e(" -- UART%d Event Task not Created!", _uart_nr);
} }

View File

@ -28,7 +28,7 @@ static void tone_task(void*){
xQueueReceive(_tone_queue, &tone_msg, portMAX_DELAY); xQueueReceive(_tone_queue, &tone_msg, portMAX_DELAY);
switch(tone_msg.tone_cmd){ switch(tone_msg.tone_cmd){
case TONE_START: case TONE_START:
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); log_d("Task received from queue TONE_START: _pin=%d, frequency=%u Hz, duration=%lu ms", tone_msg.pin, tone_msg.frequency, tone_msg.duration);
log_d("Setup LED controll on channel %d", _channel); log_d("Setup LED controll on channel %d", _channel);
// ledcSetup(_channel, tone_msg.frequency, 11); // ledcSetup(_channel, tone_msg.frequency, 11);
@ -95,6 +95,9 @@ void setToneChannel(uint8_t channel){
if(tone_init()){ if(tone_init()){
tone_msg_t tone_msg = { tone_msg_t tone_msg = {
.tone_cmd = TONE_SET_CHANNEL, .tone_cmd = TONE_SET_CHANNEL,
.pin = 0, // Ignored
.frequency = 0, // Ignored
.duration = 0, // Ignored
.channel = channel .channel = channel
}; };
xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY); xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY);
@ -106,7 +109,10 @@ void noTone(uint8_t _pin){
if(tone_init()){ if(tone_init()){
tone_msg_t tone_msg = { tone_msg_t tone_msg = {
.tone_cmd = TONE_END, .tone_cmd = TONE_END,
.pin = _pin .pin = _pin,
.frequency = 0, // Ignored
.duration = 0, // Ignored
.channel = 0 // Ignored
}; };
xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY); xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY);
} }
@ -118,13 +124,14 @@ void noTone(uint8_t _pin){
// duration - time in ms - how long will the signal be outputted. // duration - time in ms - how long will the signal be outputted.
// If not provided, or 0 you must manually call noTone to end output // If not provided, or 0 you must manually call noTone to end output
void tone(uint8_t _pin, unsigned int frequency, unsigned long duration){ void tone(uint8_t _pin, unsigned int frequency, unsigned long duration){
log_d("_pin=%d, frequency=%u Hz, duration=%u ms", _pin, frequency, duration); log_d("_pin=%d, frequency=%u Hz, duration=%lu ms", _pin, frequency, duration);
if(tone_init()){ if(tone_init()){
tone_msg_t tone_msg = { tone_msg_t tone_msg = {
.tone_cmd = TONE_START, .tone_cmd = TONE_START,
.pin = _pin, .pin = _pin,
.frequency = frequency, .frequency = frequency,
.duration = duration .duration = duration,
.channel = 0 // Ignored
}; };
xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY); xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY);
} }

View File

@ -137,6 +137,24 @@ String::String(double value, unsigned int decimalPlaces) {
} }
} }
String::String(long long value, unsigned char base) {
init();
char buf[2 + 8 * sizeof(long long)];
if (base==10) {
sprintf(buf, "%lld", value); // NOT SURE - NewLib Nano ... does it support %lld?
} else {
lltoa(value, buf, base);
}
*this = buf;
}
String::String(unsigned long long value, unsigned char base) {
init();
char buf[1 + 8 * sizeof(unsigned long long)];
ulltoa(value, buf, base);
*this = buf;
}
String::~String() { String::~String() {
invalidate(); invalidate();
} }
@ -408,6 +426,17 @@ unsigned char String::concat(double num) {
return concat(string, strlen(string)); return concat(string, strlen(string));
} }
unsigned char String::concat(long long num) {
char buf[2 + 3 * sizeof(long long)];
return concat(buf, sprintf(buf, "%lld", num)); // NOT SURE - NewLib Nano ... does it support %lld?
}
unsigned char String::concat(unsigned long long num) {
char buf[1 + 3 * sizeof(unsigned long long)];
ulltoa(num, buf, 10);
return concat(buf, strlen(buf));
}
unsigned char String::concat(const __FlashStringHelper * str) { unsigned char String::concat(const __FlashStringHelper * str) {
if (!str) return 0; if (!str) return 0;
int length = strlen_P((PGM_P)str); int length = strlen_P((PGM_P)str);
@ -493,6 +522,20 @@ StringSumHelper & operator +(const StringSumHelper &lhs, double num) {
return a; return a;
} }
StringSumHelper & operator +(const StringSumHelper &lhs, long long num) {
StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
if(!a.concat(num))
a.invalidate();
return a;
}
StringSumHelper & operator +(const StringSumHelper &lhs, unsigned long long num) {
StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
if(!a.concat(num))
a.invalidate();
return a;
}
StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs) StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs)
{ {
StringSumHelper &a = const_cast<StringSumHelper&>(lhs); StringSumHelper &a = const_cast<StringSumHelper&>(lhs);

View File

@ -73,6 +73,8 @@ class String {
explicit String(unsigned long, unsigned char base = 10); explicit String(unsigned long, unsigned char base = 10);
explicit String(float, unsigned int decimalPlaces = 2); explicit String(float, unsigned int decimalPlaces = 2);
explicit String(double, unsigned int decimalPlaces = 2); explicit String(double, unsigned int decimalPlaces = 2);
explicit String(long long, unsigned char base = 10);
explicit String(unsigned long long, unsigned char base = 10);
~String(void); ~String(void);
// memory management // memory management
@ -122,6 +124,8 @@ class String {
unsigned char concat(unsigned long num); unsigned char concat(unsigned long num);
unsigned char concat(float num); unsigned char concat(float num);
unsigned char concat(double num); unsigned char concat(double num);
unsigned char concat(long long num);
unsigned char concat(unsigned long long num);
unsigned char concat(const __FlashStringHelper * str); unsigned char concat(const __FlashStringHelper * str);
// if there's not enough memory for the concatenated value, the string // if there's not enough memory for the concatenated value, the string
@ -166,6 +170,14 @@ class String {
concat(num); concat(num);
return (*this); return (*this);
} }
String & operator +=(long long num) {
concat(num);
return (*this);
}
String & operator +=(unsigned long long num) {
concat(num);
return (*this);
}
String & operator += (const __FlashStringHelper *str){ String & operator += (const __FlashStringHelper *str){
concat(str); concat(str);
return (*this); return (*this);
@ -182,6 +194,8 @@ class String {
friend StringSumHelper & operator +(const StringSumHelper &lhs, float num); friend StringSumHelper & operator +(const StringSumHelper &lhs, float num);
friend StringSumHelper & operator +(const StringSumHelper &lhs, double num); friend StringSumHelper & operator +(const StringSumHelper &lhs, double num);
friend StringSumHelper & operator +(const StringSumHelper &lhs, const __FlashStringHelper *rhs); friend StringSumHelper & operator +(const StringSumHelper &lhs, const __FlashStringHelper *rhs);
friend StringSumHelper & operator +(const StringSumHelper &lhs, long long num);
friend StringSumHelper & operator +(const StringSumHelper &lhs, unsigned long long num);
// comparison (only works w/ Strings and "strings") // comparison (only works w/ Strings and "strings")
operator StringIfHelperType() const { operator StringIfHelperType() const {
@ -373,6 +387,12 @@ class StringSumHelper: public String {
StringSumHelper(double num) : StringSumHelper(double num) :
String(num) { String(num) {
} }
StringSumHelper(long long num) :
String(num) {
}
StringSumHelper(unsigned long long num) :
String(num) {
}
}; };
extern const String emptyString; extern const String emptyString;

View File

@ -13,43 +13,16 @@
// limitations under the License. // limitations under the License.
#include "esp32-hal-adc.h" #include "esp32-hal-adc.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_attr.h"
#include "soc/rtc_cntl_reg.h"
#include "driver/adc.h" #include "driver/adc.h"
#include "esp_system.h"
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#include "esp_adc_cal.h" #include "esp_adc_cal.h"
#if SOC_DAC_SUPPORTED //ESP32, ESP32S2
#include "soc/dac_channel.h"
#include "soc/sens_reg.h" #include "soc/sens_reg.h"
#include "soc/rtc_io_reg.h" #include "soc/rtc_io_reg.h"
#include "esp32/rom/ets_sys.h" #endif
#include "esp_intr_alloc.h"
#include "soc/dac_channel.h"
#define DEFAULT_VREF 1100 #define DEFAULT_VREF 1100
static esp_adc_cal_characteristics_t *__analogCharacteristics[2] = {NULL, NULL};
static uint16_t __analogVRef = 0;
static uint8_t __analogVRefPin = 0;
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/ets_sys.h"
#include "soc/sens_reg.h"
#include "soc/rtc_io_reg.h"
#include "soc/dac_channel.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/ets_sys.h"
#include "soc/sens_reg.h"
#include "soc/rtc_io_reg.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/ets_sys.h"
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
#else // ESP32 Before IDF 4.0
#include "rom/ets_sys.h"
#include "esp_intr.h"
#endif
static uint8_t __analogAttenuation = 3;//11db static uint8_t __analogAttenuation = 3;//11db
static uint8_t __analogWidth = ADC_WIDTH_MAX - 1; //3 for ESP32/ESP32C3; 4 for ESP32S2 static uint8_t __analogWidth = ADC_WIDTH_MAX - 1; //3 for ESP32/ESP32C3; 4 for ESP32S2
@ -57,6 +30,11 @@ static uint8_t __analogReturnedWidth = SOC_ADC_MAX_BITWIDTH; //12 for ESP32/ESP3
static uint8_t __analogClockDiv = 1; static uint8_t __analogClockDiv = 1;
static adc_attenuation_t __pin_attenuation[SOC_GPIO_PIN_COUNT]; static adc_attenuation_t __pin_attenuation[SOC_GPIO_PIN_COUNT];
static uint16_t __analogVRef = 0;
#if CONFIG_IDF_TARGET_ESP32
static uint8_t __analogVRefPin = 0;
#endif
static inline uint16_t mapResolution(uint16_t value) static inline uint16_t mapResolution(uint16_t value)
{ {
uint8_t from = __analogWidth + 9; uint8_t from = __analogWidth + 9;
@ -117,8 +95,8 @@ void __analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)
if(channel < 0 || attenuation > 3){ if(channel < 0 || attenuation > 3){
return ; return ;
} }
if(channel > 9){ if(channel > (SOC_ADC_MAX_CHANNEL_NUM - 1)){
adc2_config_channel_atten(channel - 10, attenuation); adc2_config_channel_atten(channel - SOC_ADC_MAX_CHANNEL_NUM, attenuation);
} else { } else {
adc1_config_channel_atten(channel, attenuation); adc1_config_channel_atten(channel, attenuation);
} }
@ -181,8 +159,8 @@ uint16_t __analogRead(uint8_t pin)
return value; return value;
} }
__adcAttachPin(pin); __adcAttachPin(pin);
if(channel > 9){ if(channel > (SOC_ADC_MAX_CHANNEL_NUM - 1)){
channel -= 10; channel -= SOC_ADC_MAX_CHANNEL_NUM;
r = adc2_get_raw( channel, __analogWidth, &value); r = adc2_get_raw( channel, __analogWidth, &value);
if ( r == ESP_OK ) { if ( r == ESP_OK ) {
return mapResolution(value); return mapResolution(value);
@ -206,7 +184,7 @@ uint32_t __analogReadMilliVolts(uint8_t pin){
log_e("Pin %u is not ADC pin!", pin); log_e("Pin %u is not ADC pin!", pin);
return 0; return 0;
} }
#if CONFIG_IDF_TARGET_ESP32
if(!__analogVRef){ if(!__analogVRef){
if (esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_TP) == ESP_OK) { if (esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_TP) == ESP_OK) {
log_d("eFuse Two Point: Supported"); log_d("eFuse Two Point: Supported");
@ -218,6 +196,8 @@ uint32_t __analogReadMilliVolts(uint8_t pin){
} }
if(!__analogVRef){ if(!__analogVRef){
__analogVRef = DEFAULT_VREF; __analogVRef = DEFAULT_VREF;
#if CONFIG_IDF_TARGET_ESP32
if(__analogVRefPin){ if(__analogVRefPin){
esp_adc_cal_characteristics_t chars; esp_adc_cal_characteristics_t chars;
if(adc_vref_to_gpio(ADC_UNIT_2, __analogVRefPin) == ESP_OK){ if(adc_vref_to_gpio(ADC_UNIT_2, __analogVRefPin) == ESP_OK){
@ -227,42 +207,44 @@ uint32_t __analogReadMilliVolts(uint8_t pin){
log_d("Vref to GPIO%u: %u", __analogVRefPin, __analogVRef); log_d("Vref to GPIO%u: %u", __analogVRefPin, __analogVRef);
} }
} }
#endif
} }
} }
uint8_t unit = 1; uint8_t unit = 1;
if(channel > 9){ if(channel > (SOC_ADC_MAX_CHANNEL_NUM - 1)){
unit = 2; unit = 2;
} }
uint16_t adc_reading = __analogRead(pin); uint16_t adc_reading = __analogRead(pin);
if(__analogCharacteristics[unit - 1] == NULL){
__analogCharacteristics[unit - 1] = calloc(1, sizeof(esp_adc_cal_characteristics_t)); uint8_t atten = __analogAttenuation;
if(__analogCharacteristics[unit - 1] == NULL){ if (__pin_attenuation[pin] != ADC_ATTENDB_MAX){
return 0; atten = __pin_attenuation[pin];
} }
esp_adc_cal_value_t val_type = esp_adc_cal_characterize(unit, __analogAttenuation, __analogWidth, __analogVRef, __analogCharacteristics[unit - 1]);
esp_adc_cal_characteristics_t chars = {};
esp_adc_cal_value_t val_type = esp_adc_cal_characterize(unit, atten, __analogWidth, __analogVRef, &chars);
static bool print_chars_info = true;
if(print_chars_info)
{
if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) { if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {
log_i("ADC%u: Characterized using Two Point Value: %u\n", unit, __analogCharacteristics[unit - 1]->vref); log_i("ADC%u: Characterized using Two Point Value: %u\n", unit, chars.vref);
} else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) { }
log_i("ADC%u: Characterized using eFuse Vref: %u\n", unit, __analogCharacteristics[unit - 1]->vref); else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
} else if(__analogVRef != DEFAULT_VREF){ log_i("ADC%u: Characterized using eFuse Vref: %u\n", unit, chars.vref);
log_i("ADC%u: Characterized using Vref to GPIO%u: %u\n", unit, __analogVRefPin, __analogCharacteristics[unit - 1]->vref); }
} else { #if CONFIG_IDF_TARGET_ESP32
log_i("ADC%u: Characterized using Default Vref: %u\n", unit, __analogCharacteristics[unit - 1]->vref); else if(__analogVRef != DEFAULT_VREF){
log_i("ADC%u: Characterized using Vref to GPIO%u: %u\n", unit, __analogVRefPin, chars.vref);
} }
#endif
else {
log_i("ADC%u: Characterized using Default Vref: %u\n", unit, chars.vref);
}
print_chars_info = false;
} }
return esp_adc_cal_raw_to_voltage(adc_reading, __analogCharacteristics[unit - 1]); return esp_adc_cal_raw_to_voltage((uint32_t)adc_reading, &chars);
#else
uint16_t adc_reading = __analogRead(pin);
uint16_t max_reading = 8191;
uint16_t max_mv = 1100;
switch(__analogAttenuation){
case 3: max_mv = 3900; break;
case 2: max_mv = 2200; break;
case 1: max_mv = 1500; break;
default: break;
}
return (adc_reading * max_mv) / max_reading;
#endif
} }
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
@ -297,4 +279,3 @@ extern void analogSetVRefPin(uint8_t pin) __attribute__ ((weak, alias("__analogS
extern void analogSetWidth(uint8_t bits) __attribute__ ((weak, alias("__analogSetWidth"))); extern void analogSetWidth(uint8_t bits) __attribute__ ((weak, alias("__analogSetWidth")));
extern int hallRead() __attribute__ ((weak, alias("__hallRead"))); extern int hallRead() __attribute__ ((weak, alias("__hallRead")));
#endif #endif

View File

@ -107,7 +107,7 @@ bool addApbChangeCallback(void * arg, apb_change_cb_t cb){
// look for duplicate callbacks // look for duplicate callbacks
while( (r != NULL ) && !((r->cb == cb) && ( r->arg == arg))) r = r->next; while( (r != NULL ) && !((r->cb == cb) && ( r->arg == arg))) r = r->next;
if (r) { if (r) {
log_e("duplicate func=%08X arg=%08X",c->cb,c->arg); log_e("duplicate func=%8p arg=%8p",c->cb,c->arg);
free(c); free(c);
xSemaphoreGive(apb_change_lock); xSemaphoreGive(apb_change_lock);
return false; return false;
@ -129,7 +129,7 @@ bool removeApbChangeCallback(void * arg, apb_change_cb_t cb){
// look for matching callback // look for matching callback
while( (r != NULL ) && !((r->cb == cb) && ( r->arg == arg))) r = r->next; while( (r != NULL ) && !((r->cb == cb) && ( r->arg == arg))) r = r->next;
if ( r == NULL ) { if ( r == NULL ) {
log_e("not found func=%08X arg=%08X",cb,arg); log_e("not found func=%8p arg=%8p",cb,arg);
xSemaphoreGive(apb_change_lock); xSemaphoreGive(apb_change_lock);
return false; return false;
} }

View File

@ -91,30 +91,34 @@ static InterruptHandle_t __pinInterruptHandlers[SOC_GPIO_PIN_COUNT] = {0,};
extern void ARDUINO_ISR_ATTR __pinMode(uint8_t pin, uint8_t mode) extern void ARDUINO_ISR_ATTR __pinMode(uint8_t pin, uint8_t mode)
{ {
if (!GPIO_IS_VALID_GPIO(pin)) { if (!GPIO_IS_VALID_GPIO(pin)) {
log_e("Invalid pin selected"); log_e("Invalid pin selected");
return; return;
} }
gpio_config_t conf = {
.pin_bit_mask = (1ULL<<pin), /*!< GPIO pin: set with bit mask, each bit maps to a GPIO */ gpio_hal_context_t gpiohal;
.mode = GPIO_MODE_DISABLE, /*!< GPIO mode: set input/output mode */ gpiohal.dev = GPIO_LL_GET_HW(GPIO_PORT_0);
.pull_up_en = GPIO_PULLUP_DISABLE, /*!< GPIO pull-up */
.pull_down_en = GPIO_PULLDOWN_DISABLE, /*!< GPIO pull-down */ gpio_config_t conf = {
.intr_type = GPIO_INTR_DISABLE /*!< GPIO interrupt type */ .pin_bit_mask = (1ULL<<pin), /*!< GPIO pin: set with bit mask, each bit maps to a GPIO */
}; .mode = GPIO_MODE_DISABLE, /*!< GPIO mode: set input/output mode */
if (mode < 0x20) {//io .pull_up_en = GPIO_PULLUP_DISABLE, /*!< GPIO pull-up */
conf.mode = mode & (INPUT | OUTPUT); .pull_down_en = GPIO_PULLDOWN_DISABLE, /*!< GPIO pull-down */
if (mode & OPEN_DRAIN) { .intr_type = gpiohal.dev->pin[pin].int_type /*!< GPIO interrupt type - previously set */
conf.mode |= GPIO_MODE_DEF_OD; };
} if (mode < 0x20) {//io
if (mode & PULLUP) { conf.mode = mode & (INPUT | OUTPUT);
conf.pull_up_en = GPIO_PULLUP_ENABLE; if (mode & OPEN_DRAIN) {
} conf.mode |= GPIO_MODE_DEF_OD;
if (mode & PULLDOWN) { }
conf.pull_down_en = GPIO_PULLDOWN_ENABLE; if (mode & PULLUP) {
} conf.pull_up_en = GPIO_PULLUP_ENABLE;
} }
if(gpio_config(&conf) != ESP_OK) if (mode & PULLDOWN) {
conf.pull_down_en = GPIO_PULLDOWN_ENABLE;
}
}
if(gpio_config(&conf) != ESP_OK)
{ {
log_e("GPIO config failed"); log_e("GPIO config failed");
return; return;

View File

@ -695,7 +695,6 @@ static void i2c_slave_isr_handler(void* arg)
uint32_t activeInt = i2c_ll_get_intsts_mask(i2c->dev); uint32_t activeInt = i2c_ll_get_intsts_mask(i2c->dev);
i2c_ll_clr_intsts_mask(i2c->dev, activeInt); i2c_ll_clr_intsts_mask(i2c->dev, activeInt);
uint8_t rx_fifo_len = i2c_ll_get_rxfifo_cnt(i2c->dev); uint8_t rx_fifo_len = i2c_ll_get_rxfifo_cnt(i2c->dev);
uint8_t tx_fifo_len = SOC_I2C_FIFO_LEN - i2c_ll_get_txfifo_len(i2c->dev);
bool slave_rw = i2c_ll_slave_rw(i2c->dev); bool slave_rw = i2c_ll_slave_rw(i2c->dev);
if(activeInt & I2C_RXFIFO_WM_INT_ENA){ // RX FiFo Full if(activeInt & I2C_RXFIFO_WM_INT_ENA){ // RX FiFo Full

View File

@ -200,9 +200,14 @@ void initVariant() {}
void init() __attribute__((weak)); void init() __attribute__((weak));
void init() {} void init() {}
#ifdef CONFIG_APP_ROLLBACK_ENABLE
bool verifyOta() __attribute__((weak)); bool verifyOta() __attribute__((weak));
bool verifyOta() { return true; } bool verifyOta() { return true; }
bool verifyRollbackLater() __attribute__((weak));
bool verifyRollbackLater() { return false; }
#endif
#ifdef CONFIG_BT_ENABLED #ifdef CONFIG_BT_ENABLED
//overwritten in esp32-hal-bt.c //overwritten in esp32-hal-bt.c
bool btInUse() __attribute__((weak)); bool btInUse() __attribute__((weak));
@ -212,15 +217,17 @@ bool btInUse(){ return false; }
void initArduino() void initArduino()
{ {
#ifdef CONFIG_APP_ROLLBACK_ENABLE #ifdef CONFIG_APP_ROLLBACK_ENABLE
const esp_partition_t *running = esp_ota_get_running_partition(); if(!verifyRollbackLater()){
esp_ota_img_states_t ota_state; const esp_partition_t *running = esp_ota_get_running_partition();
if (esp_ota_get_state_partition(running, &ota_state) == ESP_OK) { esp_ota_img_states_t ota_state;
if (ota_state == ESP_OTA_IMG_PENDING_VERIFY) { if (esp_ota_get_state_partition(running, &ota_state) == ESP_OK) {
if (verifyOta()) { if (ota_state == ESP_OTA_IMG_PENDING_VERIFY) {
esp_ota_mark_app_valid_cancel_rollback(); if (verifyOta()) {
} else { esp_ota_mark_app_valid_cancel_rollback();
log_e("OTA verification failed! Start rollback to the previous version ..."); } else {
esp_ota_mark_app_invalid_rollback_and_reboot(); log_e("OTA verification failed! Start rollback to the previous version ...");
esp_ota_mark_app_invalid_rollback_and_reboot();
}
} }
} }
} }

View File

@ -32,13 +32,6 @@ typedef union {
#define NUM_OF_TIMERS SOC_TIMER_GROUP_TOTAL_TIMERS #define NUM_OF_TIMERS SOC_TIMER_GROUP_TOTAL_TIMERS
typedef struct {
int timer_group;
int timer_idx;
int alarm_interval;
bool auto_reload;
} timer_info_t;
typedef struct hw_timer_s typedef struct hw_timer_s
{ {
uint8_t group; uint8_t group;
@ -47,7 +40,7 @@ typedef struct hw_timer_s
// Works for all chips // Works for all chips
static hw_timer_t timer_dev[4] = { static hw_timer_t timer_dev[4] = {
{0,0}, {1,0}, {1,0}, {1,1} {0,0}, {1,0}, {0,1}, {1,1}
}; };
// NOTE: (in IDF 5.0 there wont be need to know groups/numbers // NOTE: (in IDF 5.0 there wont be need to know groups/numbers
@ -194,7 +187,7 @@ static void _on_apb_change(void * arg, apb_change_ev_t ev_type, uint32_t old_apb
hw_timer_t * timerBegin(uint8_t num, uint16_t divider, bool countUp){ hw_timer_t * timerBegin(uint8_t num, uint16_t divider, bool countUp){
if(num >= NUM_OF_TIMERS) if(num >= NUM_OF_TIMERS)
{ {
log_e("Timer dont have that timer number."); log_e("Timer number %u exceeds available number of Timers.", num);
return NULL; return NULL;
} }
@ -220,24 +213,23 @@ void timerEnd(hw_timer_t *timer){
timer_deinit(timer->group, timer->num); timer_deinit(timer->group, timer->num);
} }
bool IRAM_ATTR timerFnWrapper(void *arg){
void (*fn)(void) = arg;
fn();
// some additional logic or handling may be required here to approriately yield or not
return false;
}
void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){ void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){
if(edge){ if(edge){
log_w("EDGE timer interrupt is not supported! Setting to LEVEL..."); log_w("EDGE timer interrupt is not supported! Setting to LEVEL...");
edge = false;
} }
timer_enable_intr(timer->group, timer->num); timer_isr_callback_add(timer->group, timer->num, timerFnWrapper, fn, 0);
timer_info_t *timer_info = calloc(1, sizeof(timer_info_t));
timer_info->timer_group = timer->group;
timer_info->timer_idx = timer->num;
timer_info->auto_reload = timerGetAutoReload(timer);
timer_info->alarm_interval = timerAlarmRead(timer);
timer_isr_callback_add(timer->group, timer->num, (timer_isr_t)fn, timer_info, 0);
} }
void timerDetachInterrupt(hw_timer_t *timer){ void timerDetachInterrupt(hw_timer_t *timer){
timerAttachInterrupt(timer, NULL, false); timer_isr_callback_remove(timer->group, timer->num);
} }
uint64_t timerReadMicros(hw_timer_t *timer){ uint64_t timerReadMicros(hw_timer_t *timer){

View File

@ -646,8 +646,9 @@ static void usb_device_task(void *param) {
/* /*
* PUBLIC API * PUBLIC API
* */ * */
static const char *tinyusb_interface_names[USB_INTERFACE_MAX] = {"MSC", "DFU", "HID", "VENDOR", "CDC", "MIDI", "CUSTOM"}; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
const char *tinyusb_interface_names[USB_INTERFACE_MAX] = {"MSC", "DFU", "HID", "VENDOR", "CDC", "MIDI", "CUSTOM"};
#endif
static bool tinyusb_is_initialized = false; static bool tinyusb_is_initialized = false;
esp_err_t tinyusb_enable_interface(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb) esp_err_t tinyusb_enable_interface(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb)

View File

@ -115,7 +115,7 @@ void uartSetPins(uart_t* uart, int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t
} }
UART_MUTEX_LOCK(); UART_MUTEX_LOCK();
// IDF uart_set_pin() will issue necessary Error Message and take care of all GPIO Number validation. // IDF uart_set_pin() will issue necessary Error Message and take care of all GPIO Number validation.
uart_set_pin(uart->num, txPin, rxPin, ctsPin, rtsPin); uart_set_pin(uart->num, txPin, rxPin, rtsPin, ctsPin);
UART_MUTEX_UNLOCK(); UART_MUTEX_UNLOCK();
} }
@ -538,8 +538,6 @@ void uartStartDetectBaudrate(uart_t *uart) {
return; return;
} }
uart_dev_t *hw = UART_LL_GET_HW(uart->num);
#ifdef CONFIG_IDF_TARGET_ESP32C3 #ifdef CONFIG_IDF_TARGET_ESP32C3
// ESP32-C3 requires further testing // ESP32-C3 requires further testing
@ -555,6 +553,7 @@ void uartStartDetectBaudrate(uart_t *uart) {
//hw->conf0.autobaud_en = 1; //hw->conf0.autobaud_en = 1;
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#else #else
uart_dev_t *hw = UART_LL_GET_HW(uart->num);
hw->auto_baud.glitch_filt = 0x08; hw->auto_baud.glitch_filt = 0x08;
hw->auto_baud.en = 0; hw->auto_baud.en = 0;
hw->auto_baud.en = 1; hw->auto_baud.en = 1;
@ -571,7 +570,6 @@ uartDetectBaudrate(uart_t *uart)
#ifndef CONFIG_IDF_TARGET_ESP32C3 // ESP32-C3 requires further testing - Baud rate detection returns wrong values #ifndef CONFIG_IDF_TARGET_ESP32C3 // ESP32-C3 requires further testing - Baud rate detection returns wrong values
static bool uartStateDetectingBaudrate = false; static bool uartStateDetectingBaudrate = false;
uart_dev_t *hw = UART_LL_GET_HW(uart->num);
if(!uartStateDetectingBaudrate) { if(!uartStateDetectingBaudrate) {
uartStartDetectBaudrate(uart); uartStartDetectBaudrate(uart);
@ -592,6 +590,7 @@ uartDetectBaudrate(uart_t *uart)
//hw->conf0.autobaud_en = 0; //hw->conf0.autobaud_en = 0;
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#else #else
uart_dev_t *hw = UART_LL_GET_HW(uart->num);
hw->auto_baud.en = 0; hw->auto_baud.en = 0;
#endif #endif
uartStateDetectingBaudrate = false; // Initialize for the next round uartStateDetectingBaudrate = false; // Initialize for the next round

View File

@ -23,7 +23,7 @@ extern "C" {
/** Minor version number (x.X.x) */ /** Minor version number (x.X.x) */
#define ESP_ARDUINO_VERSION_MINOR 0 #define ESP_ARDUINO_VERSION_MINOR 0
/** Patch version number (x.x.X) */ /** Patch version number (x.x.X) */
#define ESP_ARDUINO_VERSION_PATCH 3 #define ESP_ARDUINO_VERSION_PATCH 4
/** /**
* Macro to convert ARDUINO version number into an integer * Macro to convert ARDUINO version number into an integer

View File

@ -40,6 +40,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
fragment = (int8_t)base64_decode_value_signed(*codechar++); fragment = (int8_t)base64_decode_value_signed(*codechar++);
} while (fragment < 0); } while (fragment < 0);
*plainchar = (fragment & 0x03f) << 2; *plainchar = (fragment & 0x03f) << 2;
// fall through
case step_b: case step_b:
do { do {
if (codechar == code_in+length_in){ if (codechar == code_in+length_in){
@ -51,6 +52,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
} while (fragment < 0); } while (fragment < 0);
*plainchar++ |= (fragment & 0x030) >> 4; *plainchar++ |= (fragment & 0x030) >> 4;
*plainchar = (fragment & 0x00f) << 4; *plainchar = (fragment & 0x00f) << 4;
// fall through
case step_c: case step_c:
do { do {
if (codechar == code_in+length_in){ if (codechar == code_in+length_in){
@ -62,6 +64,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
} while (fragment < 0); } while (fragment < 0);
*plainchar++ |= (fragment & 0x03c) >> 2; *plainchar++ |= (fragment & 0x03c) >> 2;
*plainchar = (fragment & 0x003) << 6; *plainchar = (fragment & 0x003) << 6;
// fall through
case step_d: case step_d:
do { do {
if (codechar == code_in+length_in){ if (codechar == code_in+length_in){

View File

@ -44,6 +44,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
result = (fragment & 0x0fc) >> 2; result = (fragment & 0x0fc) >> 2;
*codechar++ = base64_encode_value(result); *codechar++ = base64_encode_value(result);
result = (fragment & 0x003) << 4; result = (fragment & 0x003) << 4;
// fall through
case step_B: case step_B:
if (plainchar == plaintextend) { if (plainchar == plaintextend) {
state_in->result = result; state_in->result = result;
@ -54,6 +55,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
result |= (fragment & 0x0f0) >> 4; result |= (fragment & 0x0f0) >> 4;
*codechar++ = base64_encode_value(result); *codechar++ = base64_encode_value(result);
result = (fragment & 0x00f) << 2; result = (fragment & 0x00f) << 2;
// fall through
case step_C: case step_C:
if (plainchar == plaintextend) { if (plainchar == plaintextend) {
state_in->result = result; state_in->result = result;

View File

@ -67,6 +67,31 @@ char* ltoa(long value, char* result, int base) {
return result; return result;
} }
char* lltoa (long long val, char* result, int base) {
if(base < 2 || base > 16) {
*result = 0;
return result;
}
char* out = result;
long long quotient = val > 0 ? val : -val;
do {
const long long tmp = quotient / base;
*out = "0123456789abcdef"[quotient - (tmp * base)];
++out;
quotient = tmp;
} while(quotient);
// Apply negative sign
if(val < 0)
*out++ = '-';
reverse(result, out);
*out = 0;
return result;
}
char* ultoa(unsigned long value, char* result, int base) { char* ultoa(unsigned long value, char* result, int base) {
if(base < 2 || base > 16) { if(base < 2 || base > 16) {
*result = 0; *result = 0;
@ -88,6 +113,27 @@ char* ultoa(unsigned long value, char* result, int base) {
return result; return result;
} }
char* ulltoa (unsigned long long val, char* result, int base) {
if(base < 2 || base > 16) {
*result = 0;
return result;
}
char* out = result;
unsigned long long quotient = val;
do {
const unsigned long long tmp = quotient / base;
*out = "0123456789abcdef"[quotient - (tmp * base)];
++out;
quotient = tmp;
} while(quotient);
reverse(result, out);
*out = 0;
return result;
}
char * dtostrf(double number, signed int width, unsigned int prec, char *s) { char * dtostrf(double number, signed int width, unsigned int prec, char *s) {
bool negative = false; bool negative = false;
@ -160,3 +206,5 @@ char * dtostrf(double number, signed int width, unsigned int prec, char *s) {
*out = 0; *out = 0;
return s; return s;
} }

View File

@ -35,10 +35,14 @@ char* itoa (int val, char *s, int radix);
char* ltoa (long val, char *s, int radix); char* ltoa (long val, char *s, int radix);
char* lltoa (long long val, char* s, int radix);
char* utoa (unsigned int val, char *s, int radix); char* utoa (unsigned int val, char *s, int radix);
char* ultoa (unsigned long val, char *s, int radix); char* ultoa (unsigned long val, char *s, int radix);
char* ulltoa (unsigned long long val, char* s, int radix);
char* dtostrf (double val, signed int width, unsigned int prec, char *s); char* dtostrf (double val, signed int width, unsigned int prec, char *s);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -0,0 +1,188 @@
###############
Partition Table
###############
Introduction
------------
Partition table is used to define the flash memory organization and the different kind of data will be stored on each partition.
You can use one of the available partition table scheme or create your own. You can see all the different schemes on the `tools/partitions <https://github.com/espressif/arduino-esp32/tree/master/tools/partitions>`_ folder or by the Arduino IDE tools menu `Tools -> Partition Scheme`.
The partition table is created by a .CSV (Comma-separeted Values) file with the following structure:
.. code-block::
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
Where:
1. **Name**
Is the partition name and must be a unique name. This name is not relevant for the system and the size must be at maximum of 16-chars (no special chars).
2. **Type**
This is the type of the partition. This value can be ``data`` or ``app``.
* ``app`` type is used to define the partition that will store the application.
* ``data`` type can be used to define the partition that stores general data, not the application.
3. **SubType**
The SubType defines the usage of the ``app`` and ``data`` partitions.
**data**
``ota``
The ota subtype is used to store the OTA information. This partition is used only when the OTA is used to select the initialization partition, otherwise no need to add it to your custom partition table.
The size of this partition should be a fixed size of 8kB (0x2000 bytes).
``nvs``
The nvs partition subtype is used to define the partition to store general data, like the WiFi data, device PHY calibration data and any other data to be stored on the non-volatile memory.
This kind of partition is suitable for small custom configuration data, cloud certificates, etc. Another usage for the NVS is to store sensitive data, since the NVS supports encryption.
It is highly recommended to add at least one nvs partition, labeled with the name nvs, in your custom partition tables with size of at least 12kB (0x3000 bytes). If needed, you can increase the size of the nvs partition.
The recommended size for this partition is from 12kb to 64kb. Although larger NVS partitions can be defined, we recommend using FAT or SPIFFS filesystem for storage of larger amounts of data.
``coredump``
The coredump partition subtype is used to store the core dump on the flash. The core dump is used to analyze critical errors like crash and panic.
This function must be enabled in the project configuration menu and set the data destination to flash.
The recommended size for this partition is 64kB (0x10000).
``nvs_keys``
The nvs_keys partition subtype is used to store the keys when the NVS encryption is used.
The size for this partition is 4kB (0x1000).
``fat``
The fat partition subtype defines the FAT filesystem usage, and it is suitable for larger data and if this data is often updated and changed. The FAT FS can be used with wear leveling feature to increase the erase/modification cycles per memory sector and encryption for sensitive data storage, like cloud certificates or any other data that may be protected.
To use FAT FS with wear leveling see the example.
``spiffs``
The spiffs partition subtype defines the SPI flash filesystem usage, and it is also suitable for larger files and it also performs the wear leveling and file system consistency check.
The SPIFFS do not support flash encryption.
**app**
``factory``
The factory partition subtype is the default application. The bootloader will set this partition as the default application initialization if no OTA partition is found, or the OTA partitions are empty.
If the OTA partition is used, the ota_0 can be used as the default application and the factory can be removed from the partition table to save memory space.
``ota_0`` to ``ota_15``
The ota_x partition subtype is used for the Over-the air update. The OTA feature requires at least two ota_x partition (usually ota_0 and ota_1) and it also requires the ota partition to keep the OTA information data.
Up to 16 OTA partitions can be defined but only two are needed for basic OTA feature.
``test``
The test partition subtype is used for factory test procedures.
4. **Offset**
The offset defines the partition start address. The offset is defined by the sum of the offset and the size of the earlier partition.
.. note::
Offset must be multiple of 4kB (0x1000) and for app partitions it must be aligned by 64kB (0x10000).
If left blank, the offset will be automatically calculated based on the end of the previous partition, including any necessary alignment, however, the offset for the first partition must be always set as **0x9000** and for the first application partition **0x10000**.
5. **Size**
Size defines the amount of memory to be allocated on the partition. The size can be formatted as decimal, hex numbers (0x prefix), or using unit prefix K (kilo) or M (mega) i.e: 4096 = 4K = 0x1000.
6. **Flags**
The last column in the CSV file is the flags and it is currently used to define if the partition will be encrypted by the flash encryption feature.
For example, **the most common partition** is the ``default_8MB.csv`` (see `tools/partitions <https://github.com/espressif/arduino-esp32/tree/master/tools/partitions>`_ folder for some examples):
.. code-block::
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x330000,
app1, app, ota_1, 0x340000,0x330000,
spiffs, data, spiffs, 0x670000,0x190000,
Using a Custom Partition Scheme
-------------------------------
To create your own partition table, you can create the ``partitions.csv`` file **in the same folder you created your sketch**. The build system will automatically pick the partition table file and use it instead of the predefined ones.
Here is an example you can use for a custom partition table:
.. code-block::
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 36K, 20K,
otadata, data, ota, 56K, 8K,
app0, app, ota_0, 64K, 2M,
app1, app, ota_1, , 2M,
spiffs, data, spiffs, , 8M,
This partition will use about 12MB of the 16MB flash. The offset will be automatically calculated after the first application partition and the units are in K and M.
A alternative is to create the new partition table as a new file in the `tools/partitions <https://github.com/espressif/arduino-esp32/tree/master/tools/partitions>`_ folder and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table.
Examples
--------
**2MB no OTA**
.. code-block::
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 36K, 20K,
factory, app, factory, 64K, 1900K,
**4MB no OTA**
.. code-block::
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 36K, 20K,
factory, app, factory, 64K, 4000K,
**4MB with OTA**
.. code-block::
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 36K, 20K,
otadata, data, ota, 56K, 8K,
app0, app, ota_0, 64K, 1900K,
app1, app, ota_1, , 1900K,
**8MB no OTA with Storage**
.. code-block::
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 36K, 20K,
factory, app, factory, 64K, 2M,
spiffs, data, spiffs, , 5M,
**8MB with OTA and Storage**
.. code-block::
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 36K, 20K,
otadata, data, ota, 56K, 8K,
app0, app, ota_0, 64K, 2M,
app1, app, ota_1, , 2M,
spiffs, data, spiffs, , 3M,
Reference
---------
This documentation was based on the `How to use custom partition tables on ESP32 <https://medium.com/p/69c0f3fa89c8>`_ article.

View File

@ -921,6 +921,8 @@ bool BluetoothSerial::setPin(const char *pin) {
bool BluetoothSerial::connect(String remoteName) bool BluetoothSerial::connect(String remoteName)
{ {
bool retval = false;
if (!isReady(true, READY_TIMEOUT)) return false; if (!isReady(true, READY_TIMEOUT)) return false;
if (remoteName && remoteName.length() < 1) { if (remoteName && remoteName.length() < 1) {
log_e("No remote name is provided"); log_e("No remote name is provided");
@ -942,9 +944,12 @@ bool BluetoothSerial::connect(String remoteName)
#endif #endif
xEventGroupClearBits(_spp_event_group, SPP_CLOSED); xEventGroupClearBits(_spp_event_group, SPP_CLOSED);
if (esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, INQ_LEN, INQ_NUM_RSPS) == ESP_OK) { if (esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, INQ_LEN, INQ_NUM_RSPS) == ESP_OK) {
return waitForConnect(SCAN_TIMEOUT); retval = waitForConnect(SCAN_TIMEOUT);
} }
return false; if (retval == false) {
_isRemoteAddressSet = false;
}
return retval;
} }
/** /**
@ -958,6 +963,7 @@ bool BluetoothSerial::connect(String remoteName)
*/ */
bool BluetoothSerial::connect(uint8_t remoteAddress[], int channel, esp_spp_sec_t sec_mask, esp_spp_role_t role) bool BluetoothSerial::connect(uint8_t remoteAddress[], int channel, esp_spp_sec_t sec_mask, esp_spp_role_t role)
{ {
bool retval = false;
if (!isReady(true, READY_TIMEOUT)) return false; if (!isReady(true, READY_TIMEOUT)) return false;
if (!remoteAddress) { if (!remoteAddress) {
log_e("No remote address is provided"); log_e("No remote address is provided");
@ -973,16 +979,18 @@ bool BluetoothSerial::connect(uint8_t remoteAddress[], int channel, esp_spp_sec_
log_i("master : remoteAddress"); log_i("master : remoteAddress");
xEventGroupClearBits(_spp_event_group, SPP_CLOSED); xEventGroupClearBits(_spp_event_group, SPP_CLOSED);
if (channel > 0) { if (channel > 0) {
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)
char bda_str[18]; char bda_str[18];
log_i("spp connect to remote %s channel %d", log_i("spp connect to remote %s channel %d",
bda2str(_peer_bd_addr, bda_str, sizeof(bda_str)), bda2str(_peer_bd_addr, bda_str, sizeof(bda_str)),
channel); channel);
#endif
if(esp_spp_connect(sec_mask, role, channel, _peer_bd_addr) != ESP_OK ) { if(esp_spp_connect(sec_mask, role, channel, _peer_bd_addr) != ESP_OK ) {
log_e("spp connect failed"); log_e("spp connect failed");
return false; retval = false;
} } else {
bool rc=waitForConnect(READY_TIMEOUT); retval = waitForConnect(READY_TIMEOUT);
if(rc) { if(retval) {
log_i("connected"); log_i("connected");
} else { } else {
if(this->isClosed()) { if(this->isClosed()) {
@ -991,12 +999,15 @@ bool BluetoothSerial::connect(uint8_t remoteAddress[], int channel, esp_spp_sec_
log_e("connect timed out after %dms", READY_TIMEOUT); log_e("connect timed out after %dms", READY_TIMEOUT);
} }
} }
return rc;
} }
if (esp_spp_start_discovery(_peer_bd_addr) == ESP_OK) { } else if (esp_spp_start_discovery(_peer_bd_addr) == ESP_OK) {
return waitForConnect(READY_TIMEOUT); retval = waitForConnect(READY_TIMEOUT);
}
if (!retval) {
_isRemoteAddressSet = false;
} }
return false; return retval;
} }
bool BluetoothSerial::connect() bool BluetoothSerial::connect()

View File

@ -20,6 +20,22 @@ DNSServer::DNSServer()
_port = 0; _port = 0;
} }
DNSServer::~DNSServer()
{
if (_dnsHeader) {
free(_dnsHeader);
_dnsHeader = NULL;
}
if (_dnsQuestion) {
free(_dnsQuestion);
_dnsQuestion = NULL;
}
if (_buffer) {
free(_buffer);
_buffer = NULL;
}
}
bool DNSServer::start(const uint16_t &port, const String &domainName, bool DNSServer::start(const uint16_t &port, const String &domainName,
const IPAddress &resolvedIP) const IPAddress &resolvedIP)
{ {

View File

@ -76,6 +76,7 @@ class DNSServer
{ {
public: public:
DNSServer(); DNSServer();
~DNSServer();
void processNextRequest(); void processNextRequest();
void setErrorReplyCode(const DNSReplyCode &replyCode); void setErrorReplyCode(const DNSReplyCode &replyCode);
void setTTL(const uint32_t &ttl); void setTTL(const uint32_t &ttl);

View File

@ -28,7 +28,7 @@
static const char *TAG = "camera_httpd"; static const char *TAG = "camera_httpd";
#endif #endif
// Face Detection will not work on boards without (or with disabled) PSRAM // Face Detection will not work on boards without (or with disabled) PSRAM
#ifdef BOARD_HAS_PSRAM #ifdef BOARD_HAS_PSRAM
#define CONFIG_ESP_FACE_DETECT_ENABLED 1 #define CONFIG_ESP_FACE_DETECT_ENABLED 1
// Face Recognition takes upward from 15 seconds per frame on chips other than ESP32S3 // Face Recognition takes upward from 15 seconds per frame on chips other than ESP32S3
@ -148,6 +148,7 @@ static ra_filter_t *ra_filter_init(ra_filter_t *filter, size_t sample_size)
return filter; return filter;
} }
/* unused function triggers error
static int ra_filter_run(ra_filter_t *filter, int value) static int ra_filter_run(ra_filter_t *filter, int value)
{ {
if (!filter->values) if (!filter->values)
@ -165,6 +166,7 @@ static int ra_filter_run(ra_filter_t *filter, int value)
} }
return filter->sum / filter->count; return filter->sum / filter->count;
} }
*/
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED
#if CONFIG_ESP_FACE_RECOGNITION_ENABLED #if CONFIG_ESP_FACE_RECOGNITION_ENABLED
@ -294,7 +296,9 @@ static esp_err_t bmp_handler(httpd_req_t *req)
{ {
camera_fb_t *fb = NULL; camera_fb_t *fb = NULL;
esp_err_t res = ESP_OK; esp_err_t res = ESP_OK;
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
uint64_t fr_start = esp_timer_get_time(); uint64_t fr_start = esp_timer_get_time();
#endif
fb = esp_camera_fb_get(); fb = esp_camera_fb_get();
if (!fb) if (!fb)
{ {
@ -323,7 +327,9 @@ static esp_err_t bmp_handler(httpd_req_t *req)
} }
res = httpd_resp_send(req, (const char *)buf, buf_len); res = httpd_resp_send(req, (const char *)buf, buf_len);
free(buf); free(buf);
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
uint64_t fr_end = esp_timer_get_time(); uint64_t fr_end = esp_timer_get_time();
#endif
ESP_LOGI(TAG, "BMP: %llums, %uB", (uint64_t)((fr_end - fr_start) / 1000), buf_len); ESP_LOGI(TAG, "BMP: %llums, %uB", (uint64_t)((fr_end - fr_start) / 1000), buf_len);
return res; return res;
} }
@ -347,7 +353,9 @@ static esp_err_t capture_handler(httpd_req_t *req)
{ {
camera_fb_t *fb = NULL; camera_fb_t *fb = NULL;
esp_err_t res = ESP_OK; esp_err_t res = ESP_OK;
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
int64_t fr_start = esp_timer_get_time(); int64_t fr_start = esp_timer_get_time();
#endif
#ifdef CONFIG_LED_ILLUMINATOR_ENABLED #ifdef CONFIG_LED_ILLUMINATOR_ENABLED
enable_led(true); enable_led(true);
@ -377,15 +385,21 @@ static esp_err_t capture_handler(httpd_req_t *req)
size_t out_len, out_width, out_height; size_t out_len, out_width, out_height;
uint8_t *out_buf; uint8_t *out_buf;
bool s; bool s;
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
bool detected = false; bool detected = false;
#endif
int face_id = 0; int face_id = 0;
if (!detection_enabled || fb->width > 400) if (!detection_enabled || fb->width > 400)
{ {
#endif #endif
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
size_t fb_len = 0; size_t fb_len = 0;
#endif
if (fb->format == PIXFORMAT_JPEG) if (fb->format == PIXFORMAT_JPEG)
{ {
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fb_len = fb->len; fb_len = fb->len;
#endif
res = httpd_resp_send(req, (const char *)fb->buf, fb->len); res = httpd_resp_send(req, (const char *)fb->buf, fb->len);
} }
else else
@ -393,10 +407,14 @@ static esp_err_t capture_handler(httpd_req_t *req)
jpg_chunking_t jchunk = {req, 0}; jpg_chunking_t jchunk = {req, 0};
res = frame2jpg_cb(fb, 80, jpg_encode_stream, &jchunk) ? ESP_OK : ESP_FAIL; res = frame2jpg_cb(fb, 80, jpg_encode_stream, &jchunk) ? ESP_OK : ESP_FAIL;
httpd_resp_send_chunk(req, NULL, 0); httpd_resp_send_chunk(req, NULL, 0);
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fb_len = jchunk.len; fb_len = jchunk.len;
#endif
} }
esp_camera_fb_return(fb); esp_camera_fb_return(fb);
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
int64_t fr_end = esp_timer_get_time(); int64_t fr_end = esp_timer_get_time();
#endif
ESP_LOGI(TAG, "JPG: %uB %ums", (uint32_t)(fb_len), (uint32_t)((fr_end - fr_start) / 1000)); ESP_LOGI(TAG, "JPG: %uB %ums", (uint32_t)(fb_len), (uint32_t)((fr_end - fr_start) / 1000));
return res; return res;
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED
@ -425,12 +443,14 @@ static esp_err_t capture_handler(httpd_req_t *req)
rfb.data = fb->buf; rfb.data = fb->buf;
rfb.bytes_per_pixel = 2; rfb.bytes_per_pixel = 2;
rfb.format = FB_RGB565; rfb.format = FB_RGB565;
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
detected = true; detected = true;
#endif
draw_face_boxes(&rfb, &results, face_id); draw_face_boxes(&rfb, &results, face_id);
} }
s = fmt2jpg_cb(fb->buf, fb->len, fb->width, fb->height, PIXFORMAT_RGB565, 90, jpg_encode_stream, &jchunk); s = fmt2jpg_cb(fb->buf, fb->len, fb->width, fb->height, PIXFORMAT_RGB565, 90, jpg_encode_stream, &jchunk);
esp_camera_fb_return(fb); esp_camera_fb_return(fb);
} else } else
{ {
out_len = fb->width * fb->height * 3; out_len = fb->width * fb->height * 3;
out_width = fb->width; out_width = fb->width;
@ -468,7 +488,9 @@ static esp_err_t capture_handler(httpd_req_t *req)
#endif #endif
if (results.size() > 0) { if (results.size() > 0) {
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
detected = true; detected = true;
#endif
#if CONFIG_ESP_FACE_RECOGNITION_ENABLED #if CONFIG_ESP_FACE_RECOGNITION_ENABLED
if (recognition_enabled) { if (recognition_enabled) {
face_id = run_face_recognition(&rfb, &results); face_id = run_face_recognition(&rfb, &results);
@ -486,8 +508,9 @@ static esp_err_t capture_handler(httpd_req_t *req)
httpd_resp_send_500(req); httpd_resp_send_500(req);
return ESP_FAIL; return ESP_FAIL;
} }
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
int64_t fr_end = esp_timer_get_time(); int64_t fr_end = esp_timer_get_time();
#endif
ESP_LOGI(TAG, "FACE: %uB %ums %s%d", (uint32_t)(jchunk.len), (uint32_t)((fr_end - fr_start) / 1000), detected ? "DETECTED " : "", face_id); ESP_LOGI(TAG, "FACE: %uB %ums %s%d", (uint32_t)(jchunk.len), (uint32_t)((fr_end - fr_start) / 1000), detected ? "DETECTED " : "", face_id);
return res; return res;
#endif #endif
@ -502,14 +525,15 @@ static esp_err_t stream_handler(httpd_req_t *req)
uint8_t *_jpg_buf = NULL; uint8_t *_jpg_buf = NULL;
char *part_buf[128]; char *part_buf[128];
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED
bool detected = false; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
bool detected = false;
int64_t fr_ready = 0;
int64_t fr_recognize = 0;
int64_t fr_encode = 0;
int64_t fr_face = 0;
int64_t fr_start = 0;
#endif
int face_id = 0; int face_id = 0;
int64_t fr_start = 0;
int64_t fr_ready = 0;
int64_t fr_face = 0;
int64_t fr_recognize = 0;
int64_t fr_encode = 0;
size_t out_len = 0, out_width = 0, out_height = 0; size_t out_len = 0, out_width = 0, out_height = 0;
uint8_t *out_buf = NULL; uint8_t *out_buf = NULL;
bool s = false; bool s = false;
@ -544,7 +568,9 @@ static esp_err_t stream_handler(httpd_req_t *req)
while (true) while (true)
{ {
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
detected = false; detected = false;
#endif
face_id = 0; face_id = 0;
#endif #endif
@ -559,11 +585,13 @@ static esp_err_t stream_handler(httpd_req_t *req)
_timestamp.tv_sec = fb->timestamp.tv_sec; _timestamp.tv_sec = fb->timestamp.tv_sec;
_timestamp.tv_usec = fb->timestamp.tv_usec; _timestamp.tv_usec = fb->timestamp.tv_usec;
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_start = esp_timer_get_time(); fr_start = esp_timer_get_time();
fr_ready = fr_start; fr_ready = fr_start;
fr_face = fr_start;
fr_encode = fr_start; fr_encode = fr_start;
fr_recognize = fr_start; fr_recognize = fr_start;
fr_face = fr_start;
#endif
if (!detection_enabled || fb->width > 400) if (!detection_enabled || fb->width > 400)
{ {
#endif #endif
@ -592,15 +620,19 @@ static esp_err_t stream_handler(httpd_req_t *req)
&& !recognition_enabled && !recognition_enabled
#endif #endif
){ ){
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_ready = esp_timer_get_time(); fr_ready = esp_timer_get_time();
#endif
#if TWO_STAGE #if TWO_STAGE
std::list<dl::detect::result_t> &candidates = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}); std::list<dl::detect::result_t> &candidates = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3});
std::list<dl::detect::result_t> &results = s2.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}, candidates); std::list<dl::detect::result_t> &results = s2.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}, candidates);
#else #else
std::list<dl::detect::result_t> &results = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3}); std::list<dl::detect::result_t> &results = s1.infer((uint16_t *)fb->buf, {(int)fb->height, (int)fb->width, 3});
#endif #endif
#if CONFIG_ESP_FACE_DETECT_ENABLED && ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_face = esp_timer_get_time(); fr_face = esp_timer_get_time();
fr_recognize = fr_face; fr_recognize = fr_face;
#endif
if (results.size() > 0) { if (results.size() > 0) {
fb_data_t rfb; fb_data_t rfb;
rfb.width = fb->width; rfb.width = fb->width;
@ -608,7 +640,9 @@ static esp_err_t stream_handler(httpd_req_t *req)
rfb.data = fb->buf; rfb.data = fb->buf;
rfb.bytes_per_pixel = 2; rfb.bytes_per_pixel = 2;
rfb.format = FB_RGB565; rfb.format = FB_RGB565;
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
detected = true; detected = true;
#endif
draw_face_boxes(&rfb, &results, face_id); draw_face_boxes(&rfb, &results, face_id);
} }
s = fmt2jpg(fb->buf, fb->len, fb->width, fb->height, PIXFORMAT_RGB565, 80, &_jpg_buf, &_jpg_buf_len); s = fmt2jpg(fb->buf, fb->len, fb->width, fb->height, PIXFORMAT_RGB565, 80, &_jpg_buf, &_jpg_buf_len);
@ -618,8 +652,10 @@ static esp_err_t stream_handler(httpd_req_t *req)
ESP_LOGE(TAG, "fmt2jpg failed"); ESP_LOGE(TAG, "fmt2jpg failed");
res = ESP_FAIL; res = ESP_FAIL;
} }
#if CONFIG_ESP_FACE_DETECT_ENABLED && ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_encode = esp_timer_get_time(); fr_encode = esp_timer_get_time();
} else #endif
} else
{ {
out_len = fb->width * fb->height * 3; out_len = fb->width * fb->height * 3;
out_width = fb->width; out_width = fb->width;
@ -637,7 +673,9 @@ static esp_err_t stream_handler(httpd_req_t *req)
ESP_LOGE(TAG, "to rgb888 failed"); ESP_LOGE(TAG, "to rgb888 failed");
res = ESP_FAIL; res = ESP_FAIL;
} else { } else {
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_ready = esp_timer_get_time(); fr_ready = esp_timer_get_time();
#endif
fb_data_t rfb; fb_data_t rfb;
rfb.width = out_width; rfb.width = out_width;
@ -653,15 +691,21 @@ static esp_err_t stream_handler(httpd_req_t *req)
std::list<dl::detect::result_t> &results = s1.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3}); std::list<dl::detect::result_t> &results = s1.infer((uint8_t *)out_buf, {(int)out_height, (int)out_width, 3});
#endif #endif
#if CONFIG_ESP_FACE_DETECT_ENABLED && ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_face = esp_timer_get_time(); fr_face = esp_timer_get_time();
fr_recognize = fr_face; fr_recognize = fr_face;
#endif
if (results.size() > 0) { if (results.size() > 0) {
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
detected = true; detected = true;
#endif
#if CONFIG_ESP_FACE_RECOGNITION_ENABLED #if CONFIG_ESP_FACE_RECOGNITION_ENABLED
if (recognition_enabled) { if (recognition_enabled) {
face_id = run_face_recognition(&rfb, &results); face_id = run_face_recognition(&rfb, &results);
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_recognize = esp_timer_get_time(); fr_recognize = esp_timer_get_time();
#endif
} }
#endif #endif
draw_face_boxes(&rfb, &results, face_id); draw_face_boxes(&rfb, &results, face_id);
@ -672,7 +716,9 @@ static esp_err_t stream_handler(httpd_req_t *req)
ESP_LOGE(TAG, "fmt2jpg failed"); ESP_LOGE(TAG, "fmt2jpg failed");
res = ESP_FAIL; res = ESP_FAIL;
} }
#if CONFIG_ESP_FACE_DETECT_ENABLED && ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
fr_encode = esp_timer_get_time(); fr_encode = esp_timer_get_time();
#endif
} }
} }
} }
@ -710,7 +756,7 @@ static esp_err_t stream_handler(httpd_req_t *req)
} }
int64_t fr_end = esp_timer_get_time(); int64_t fr_end = esp_timer_get_time();
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED && ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
int64_t ready_time = (fr_ready - fr_start) / 1000; int64_t ready_time = (fr_ready - fr_start) / 1000;
int64_t face_time = (fr_face - fr_ready) / 1000; int64_t face_time = (fr_face - fr_ready) / 1000;
int64_t recognize_time = (fr_recognize - fr_face) / 1000; int64_t recognize_time = (fr_recognize - fr_face) / 1000;
@ -719,9 +765,10 @@ static esp_err_t stream_handler(httpd_req_t *req)
#endif #endif
int64_t frame_time = fr_end - last_frame; int64_t frame_time = fr_end - last_frame;
last_frame = fr_end;
frame_time /= 1000; frame_time /= 1000;
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
uint32_t avg_frame_time = ra_filter_run(&ra_filter, frame_time); uint32_t avg_frame_time = ra_filter_run(&ra_filter, frame_time);
#endif
ESP_LOGI(TAG, "MJPG: %uB %ums (%.1ffps), AVG: %ums (%.1ffps)" ESP_LOGI(TAG, "MJPG: %uB %ums (%.1ffps), AVG: %ums (%.1ffps)"
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED
", %u+%u+%u+%u=%u %s%d" ", %u+%u+%u+%u=%u %s%d"
@ -743,7 +790,6 @@ static esp_err_t stream_handler(httpd_req_t *req)
enable_led(false); enable_led(false);
#endif #endif
last_frame = 0;
return res; return res;
} }

View File

@ -30,7 +30,7 @@
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ #define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
void print_reset_reason(RESET_REASON reason) void print_reset_reason(int reason)
{ {
switch ( reason) switch ( reason)
{ {
@ -53,7 +53,7 @@ void print_reset_reason(RESET_REASON reason)
} }
} }
void verbose_print_reset_reason(RESET_REASON reason) void verbose_print_reset_reason(int reason)
{ {
switch ( reason) switch ( reason)
{ {

View File

@ -30,8 +30,6 @@ void setup() {
} }
void loop() { void loop() {
static uint32_t count = 0;
if (touch1detected) { if (touch1detected) {
touch1detected = false; touch1detected = false;
if (touchInterruptGetLastStatus(T1)) { if (touchInterruptGetLastStatus(T1)) {

View File

@ -57,24 +57,25 @@ extern void tcpipInit();
static eth_clock_mode_t eth_clock_mode = ETH_CLK_MODE; static eth_clock_mode_t eth_clock_mode = ETH_CLK_MODE;
#if CONFIG_ETH_RMII_CLK_INPUT #if CONFIG_ETH_RMII_CLK_INPUT
/*
static void emac_config_apll_clock(void) static void emac_config_apll_clock(void)
{ {
/* apll_freq = xtal_freq * (4 + sdm2 + sdm1/256 + sdm0/65536)/((o_div + 2) * 2) */ // apll_freq = xtal_freq * (4 + sdm2 + sdm1/256 + sdm0/65536)/((o_div + 2) * 2)
rtc_xtal_freq_t rtc_xtal_freq = rtc_clk_xtal_freq_get(); rtc_xtal_freq_t rtc_xtal_freq = rtc_clk_xtal_freq_get();
switch (rtc_xtal_freq) { switch (rtc_xtal_freq) {
case RTC_XTAL_FREQ_40M: // Recommended case RTC_XTAL_FREQ_40M: // Recommended
/* 50 MHz = 40MHz * (4 + 6) / (2 * (2 + 2) = 50.000 */ // 50 MHz = 40MHz * (4 + 6) / (2 * (2 + 2) = 50.000
/* sdm0 = 0, sdm1 = 0, sdm2 = 6, o_div = 2 */ // sdm0 = 0, sdm1 = 0, sdm2 = 6, o_div = 2
rtc_clk_apll_enable(true, 0, 0, 6, 2); rtc_clk_apll_enable(true, 0, 0, 6, 2);
break; break;
case RTC_XTAL_FREQ_26M: case RTC_XTAL_FREQ_26M:
/* 50 MHz = 26MHz * (4 + 15 + 118 / 256 + 39/65536) / ((3 + 2) * 2) = 49.999992 */ // 50 MHz = 26MHz * (4 + 15 + 118 / 256 + 39/65536) / ((3 + 2) * 2) = 49.999992
/* sdm0 = 39, sdm1 = 118, sdm2 = 15, o_div = 3 */ // sdm0 = 39, sdm1 = 118, sdm2 = 15, o_div = 3
rtc_clk_apll_enable(true, 39, 118, 15, 3); rtc_clk_apll_enable(true, 39, 118, 15, 3);
break; break;
case RTC_XTAL_FREQ_24M: case RTC_XTAL_FREQ_24M:
/* 50 MHz = 24MHz * (4 + 12 + 255 / 256 + 255/65536) / ((2 + 2) * 2) = 49.499977 */ // 50 MHz = 24MHz * (4 + 12 + 255 / 256 + 255/65536) / ((2 + 2) * 2) = 49.499977
/* sdm0 = 255, sdm1 = 255, sdm2 = 12, o_div = 2 */ // sdm0 = 255, sdm1 = 255, sdm2 = 12, o_div = 2
rtc_clk_apll_enable(true, 255, 255, 12, 2); rtc_clk_apll_enable(true, 255, 255, 12, 2);
break; break;
default: // Assume we have a 40M xtal default: // Assume we have a 40M xtal
@ -82,8 +83,10 @@ static void emac_config_apll_clock(void)
break; break;
} }
} }
*/
#endif #endif
/*
static esp_err_t on_lowlevel_init_done(esp_eth_handle_t eth_handle){ static esp_err_t on_lowlevel_init_done(esp_eth_handle_t eth_handle){
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
if(eth_clock_mode > ETH_CLOCK_GPIO17_OUT){ if(eth_clock_mode > ETH_CLOCK_GPIO17_OUT){
@ -168,7 +171,7 @@ static esp_err_t on_lowlevel_init_done(esp_eth_handle_t eth_handle){
#endif #endif
return ESP_OK; return ESP_OK;
} }
*/
/** /**
@ -404,7 +407,7 @@ bool ETHClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, I
esp_err_t err = ESP_OK; esp_err_t err = ESP_OK;
tcpip_adapter_ip_info_t info; tcpip_adapter_ip_info_t info;
if(local_ip != (uint32_t)0x00000000 && local_ip != INADDR_NONE){ if(static_cast<uint32_t>(local_ip) != 0){
info.ip.addr = static_cast<uint32_t>(local_ip); info.ip.addr = static_cast<uint32_t>(local_ip);
info.gw.addr = static_cast<uint32_t>(gateway); info.gw.addr = static_cast<uint32_t>(gateway);
info.netmask.addr = static_cast<uint32_t>(subnet); info.netmask.addr = static_cast<uint32_t>(subnet);
@ -440,13 +443,13 @@ bool ETHClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, I
ip_addr_t d; ip_addr_t d;
d.type = IPADDR_TYPE_V4; d.type = IPADDR_TYPE_V4;
if(dns1 != (uint32_t)0x00000000 && dns1 != INADDR_NONE) { if(static_cast<uint32_t>(dns1) != 0) {
// Set DNS1-Server // Set DNS1-Server
d.u_addr.ip4.addr = static_cast<uint32_t>(dns1); d.u_addr.ip4.addr = static_cast<uint32_t>(dns1);
dns_setserver(0, &d); dns_setserver(0, &d);
} }
if(dns2 != (uint32_t)0x00000000 && dns2 != INADDR_NONE) { if(static_cast<uint32_t>(dns2) != 0) {
// Set DNS2-Server // Set DNS2-Server
d.u_addr.ip4.addr = static_cast<uint32_t>(dns2); d.u_addr.ip4.addr = static_cast<uint32_t>(dns2);
dns_setserver(1, &d); dns_setserver(1, &d);

View File

@ -988,7 +988,6 @@ void I2SClass::_post_read_data_fix(void *input, size_t *size){
// bytes_written - number of bytes used from original buffer // bytes_written - number of bytes used from original buffer
// actual_bytes_written - number of bytes written by i2s_write after fix // actual_bytes_written - number of bytes written by i2s_write after fix
void I2SClass::_fix_and_write(void *output, size_t size, size_t *bytes_written, size_t *actual_bytes_written){ void I2SClass::_fix_and_write(void *output, size_t size, size_t *bytes_written, size_t *actual_bytes_written){
long start = millis();
ulong src_ptr = 0; ulong src_ptr = 0;
uint8_t* buff = NULL; uint8_t* buff = NULL;
size_t buff_size = size; size_t buff_size = size;

View File

@ -1,2 +1,2 @@
Import("env") Import("env")
env.Replace( MKSPIFFSTOOL=env.get("PROJECT_DIR") + '/mklittlefs' ) env.Replace( MKSPIFFSTOOL=env.get("PROJECT_DIR") + '/mklittlefs' ) # PlatformIO now believes it has actually created a SPIFFS

View File

@ -36,6 +36,7 @@ void sysProvEvent(arduino_event_t *sys_event)
printQR(service_name, pop, "ble"); printQR(service_name, pop, "ble");
#endif #endif
break; break;
default:;
} }
} }

View File

@ -50,6 +50,7 @@ void sysProvEvent(arduino_event_t *sys_event)
Serial.printf("\nConnected to Wi-Fi!\n"); Serial.printf("\nConnected to Wi-Fi!\n");
digitalWrite(gpio_led, true); digitalWrite(gpio_led, true);
break; break;
default:;
} }
} }

View File

@ -35,6 +35,7 @@ void sysProvEvent(arduino_event_t *sys_event)
printQR(service_name, pop, "ble"); printQR(service_name, pop, "ble");
#endif #endif
break; break;
default:;
} }
} }

View File

@ -0,0 +1,21 @@
#include "RMakerQR.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
void printQR(const char *name, const char *pop, const char *transport)
{
if (!name || !pop || !transport) {
log_w("Cannot generate QR code payload. Data missing.");
return;
}
char payload[150];
snprintf(payload, sizeof(payload), "{\"ver\":\"%s\",\"name\":\"%s\"" \
",\"pop\":\"%s\",\"transport\":\"%s\"}",
PROV_QR_VERSION, name, pop, transport);
if(Serial){
Serial.printf("Scan this QR code from the ESP RainMaker phone app.\n");
}
qrcode_display(payload);
if(Serial){
Serial.printf("If QR code is not visible, copy paste the below URL in a browser.\n%s?data=%s\n", QRCODE_BASE_URL, payload);
}
}
#endif

View File

@ -14,24 +14,12 @@
#pragma once #pragma once
#include "sdkconfig.h" #include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMaker.h"
#include "esp_system.h" #include "esp_system.h"
#include <qrcode.h> #include <qrcode.h>
#define PROV_QR_VERSION "v1" #define PROV_QR_VERSION "v1"
#define QRCODE_BASE_URL "https://rainmaker.espressif.com/qrcode.html" #define QRCODE_BASE_URL "https://rainmaker.espressif.com/qrcode.html"
static void printQR(const char *name, const char *pop, const char *transport) void printQR(const char *name, const char *pop, const char *transport);
{
if (!name || !pop || !transport) {
log_w("Cannot generate QR code payload. Data missing.");
return;
}
char payload[150];
snprintf(payload, sizeof(payload), "{\"ver\":\"%s\",\"name\":\"%s\"" \
",\"pop\":\"%s\",\"transport\":\"%s\"}",
PROV_QR_VERSION, name, pop, transport);
Serial.printf("Scan this QR code from the ESP RainMaker phone app.\n");
qrcode_display(payload);
Serial.printf("If QR code is not visible, copy paste the below URL in a browser.\n%s?data=%s\n", QRCODE_BASE_URL, payload);
}
#endif #endif

View File

@ -0,0 +1,12 @@
#include "RMakerUtils.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
void RMakerFactoryReset(int seconds)
{
esp_rmaker_factory_reset(0, seconds);
}
void RMakerWiFiReset(int seconds)
{
esp_rmaker_wifi_reset(0, seconds);
}
#endif

View File

@ -14,16 +14,10 @@
#pragma once #pragma once
#include "sdkconfig.h" #include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMaker.h"
#include "esp_system.h" #include "esp_system.h"
#include <esp_rmaker_utils.h> #include <esp_rmaker_utils.h>
static void RMakerFactoryReset(int seconds) void RMakerFactoryReset(int seconds);
{ void RMakerWiFiReset(int seconds);
esp_rmaker_factory_reset(0, seconds);
}
static void RMakerWiFiReset(int seconds)
{
esp_rmaker_wifi_reset(0, seconds);
}
#endif #endif

View File

@ -801,8 +801,13 @@ bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files, bool format
if (res != FR_OK) { if (res != FR_OK) {
log_e("f_mount failed: %s", fferr2str[res]); log_e("f_mount failed: %s", fferr2str[res]);
if(res == 13 && format_if_empty){ if(res == 13 && format_if_empty){
BYTE work[FF_MAX_SS]; BYTE* work = (BYTE*) malloc(sizeof(BYTE) * FF_MAX_SS);
if (!work) {
log_e("alloc for f_mkfs failed");
return false;
}
res = f_mkfs(drv, FM_ANY, 0, work, sizeof(work)); res = f_mkfs(drv, FM_ANY, 0, work, sizeof(work));
free(work);
if (res != FR_OK) { if (res != FR_OK) {
log_e("f_mkfs failed: %s", fferr2str[res]); log_e("f_mkfs failed: %s", fferr2str[res]);
esp_vfs_fat_unregister_path(path); esp_vfs_fat_unregister_path(path);

View File

@ -20,6 +20,15 @@
*/ */
#include "SPI.h" #include "SPI.h"
#include "esp32-hal-log.h"
#if !CONFIG_DISABLE_HAL_LOCKS
#define SPI_PARAM_LOCK() do {} while (xSemaphoreTake(paramLock, portMAX_DELAY) != pdPASS)
#define SPI_PARAM_UNLOCK() xSemaphoreGive(paramLock)
#else
#define SPI_PARAM_LOCK()
#define SPI_PARAM_UNLOCK()
#endif
SPIClass::SPIClass(uint8_t spi_bus) SPIClass::SPIClass(uint8_t spi_bus)
:_spi_num(spi_bus) :_spi_num(spi_bus)
@ -32,7 +41,31 @@ SPIClass::SPIClass(uint8_t spi_bus)
,_div(0) ,_div(0)
,_freq(1000000) ,_freq(1000000)
,_inTransaction(false) ,_inTransaction(false)
#if !CONFIG_DISABLE_HAL_LOCKS
,paramLock(NULL)
{
if(paramLock==NULL){
paramLock = xSemaphoreCreateMutex();
if(paramLock==NULL){
log_e("xSemaphoreCreateMutex failed");
return;
}
}
}
#else
{} {}
#endif
SPIClass::~SPIClass()
{
end();
#if !CONFIG_DISABLE_HAL_LOCKS
if(paramLock!=NULL){
vSemaphoreDelete(paramLock);
paramLock = NULL;
}
#endif
}
void SPIClass::begin(int8_t sck, int8_t miso, int8_t mosi, int8_t ss) void SPIClass::begin(int8_t sck, int8_t miso, int8_t mosi, int8_t ss)
{ {
@ -106,6 +139,7 @@ void SPIClass::setHwCs(bool use)
void SPIClass::setFrequency(uint32_t freq) void SPIClass::setFrequency(uint32_t freq)
{ {
SPI_PARAM_LOCK();
//check if last freq changed //check if last freq changed
uint32_t cdiv = spiGetClockDiv(_spi); uint32_t cdiv = spiGetClockDiv(_spi);
if(_freq != freq || _div != cdiv) { if(_freq != freq || _div != cdiv) {
@ -113,12 +147,15 @@ void SPIClass::setFrequency(uint32_t freq)
_div = spiFrequencyToClockDiv(_freq); _div = spiFrequencyToClockDiv(_freq);
spiSetClockDiv(_spi, _div); spiSetClockDiv(_spi, _div);
} }
SPI_PARAM_UNLOCK();
} }
void SPIClass::setClockDivider(uint32_t clockDiv) void SPIClass::setClockDivider(uint32_t clockDiv)
{ {
SPI_PARAM_LOCK();
_div = clockDiv; _div = clockDiv;
spiSetClockDiv(_spi, _div); spiSetClockDiv(_spi, _div);
SPI_PARAM_UNLOCK();
} }
uint32_t SPIClass::getClockDivider() uint32_t SPIClass::getClockDivider()
@ -138,6 +175,7 @@ void SPIClass::setBitOrder(uint8_t bitOrder)
void SPIClass::beginTransaction(SPISettings settings) void SPIClass::beginTransaction(SPISettings settings)
{ {
SPI_PARAM_LOCK();
//check if last freq changed //check if last freq changed
uint32_t cdiv = spiGetClockDiv(_spi); uint32_t cdiv = spiGetClockDiv(_spi);
if(_freq != settings._clock || _div != cdiv) { if(_freq != settings._clock || _div != cdiv) {
@ -153,6 +191,7 @@ void SPIClass::endTransaction()
if(_inTransaction){ if(_inTransaction){
_inTransaction = false; _inTransaction = false;
spiEndTransaction(_spi); spiEndTransaction(_spi);
SPI_PARAM_UNLOCK(); // <-- Im not sure should it be here or right after spiTransaction()
} }
} }
@ -226,9 +265,9 @@ void SPIClass::writeBytes(const uint8_t * data, uint32_t size)
spiEndTransaction(_spi); spiEndTransaction(_spi);
} }
void SPIClass::transfer(uint8_t * data, uint32_t size) void SPIClass::transfer(void * data, uint32_t size)
{ {
transferBytes(data, data, size); transferBytes((const uint8_t *)data, (uint8_t *)data, size);
} }
/** /**

View File

@ -24,6 +24,8 @@
#include <stdlib.h> #include <stdlib.h>
#include "pins_arduino.h" #include "pins_arduino.h"
#include "esp32-hal-spi.h" #include "esp32-hal-spi.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#define SPI_HAS_TRANSACTION #define SPI_HAS_TRANSACTION
@ -50,10 +52,14 @@ private:
uint32_t _div; uint32_t _div;
uint32_t _freq; uint32_t _freq;
bool _inTransaction; bool _inTransaction;
#if !CONFIG_DISABLE_HAL_LOCKS
SemaphoreHandle_t paramLock=NULL;
#endif
void writePattern_(const uint8_t * data, uint8_t size, uint8_t repeat); void writePattern_(const uint8_t * data, uint8_t size, uint8_t repeat);
public: public:
SPIClass(uint8_t spi_bus=HSPI); SPIClass(uint8_t spi_bus=HSPI);
~SPIClass();
void begin(int8_t sck=-1, int8_t miso=-1, int8_t mosi=-1, int8_t ss=-1); void begin(int8_t sck=-1, int8_t miso=-1, int8_t mosi=-1, int8_t ss=-1);
void end(); void end();
@ -67,7 +73,7 @@ public:
void beginTransaction(SPISettings settings); void beginTransaction(SPISettings settings);
void endTransaction(void); void endTransaction(void);
void transfer(uint8_t * data, uint32_t size); void transfer(void * data, uint32_t size);
uint8_t transfer(uint8_t data); uint8_t transfer(uint8_t data);
uint16_t transfer16(uint16_t data); uint16_t transfer16(uint16_t data);
uint32_t transfer32(uint32_t data); uint32_t transfer32(uint32_t data);

View File

@ -20,7 +20,7 @@ static void vendorEventCallback(void* arg, esp_event_base_t event_base, int32_t
case ARDUINO_USB_HID_VENDOR_SET_FEATURE_EVENT: case ARDUINO_USB_HID_VENDOR_SET_FEATURE_EVENT:
Serial.printf("HID VENDOR SET FEATURE: len:%u\n", data->len); Serial.printf("HID VENDOR SET FEATURE: len:%u\n", data->len);
for(uint16_t i=0; i<data->len; i++){ for(uint16_t i=0; i<data->len; i++){
Serial.printf("0x%02X ",data->buffer); Serial.printf("0x%02X ",*(data->buffer));
} }
Serial.println(); Serial.println();
break; break;

View File

@ -42,7 +42,9 @@ static bool tinyusb_hid_is_initialized = false;
static uint8_t tinyusb_loaded_hid_devices_num = 0; static uint8_t tinyusb_loaded_hid_devices_num = 0;
static uint16_t tinyusb_hid_device_descriptor_len = 0; static uint16_t tinyusb_hid_device_descriptor_len = 0;
static uint8_t * tinyusb_hid_device_descriptor = NULL; static uint8_t * tinyusb_hid_device_descriptor = NULL;
static const char * tinyusb_hid_device_report_types[4] = {"INVALID", "INPUT", "OUTPUT", "FEATURE"}; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
static const char * tinyusb_hid_device_report_types[4] = {"INVALID", "INPUT", "OUTPUT", "FEATURE"};
#endif
static bool tinyusb_enable_hid_device(uint16_t descriptor_len, USBHIDDevice * device){ static bool tinyusb_enable_hid_device(uint16_t descriptor_len, USBHIDDevice * device){
if(tinyusb_hid_is_initialized){ if(tinyusb_hid_is_initialized){

View File

@ -274,7 +274,6 @@ size_t USBHIDKeyboard::releaseRaw(uint8_t k)
// call release(), releaseAll(), or otherwise clear the report and resend. // call release(), releaseAll(), or otherwise clear the report and resend.
size_t USBHIDKeyboard::press(uint8_t k) size_t USBHIDKeyboard::press(uint8_t k)
{ {
uint8_t i;
if (k >= 0x88) { // it's a non-printing key (not a modifier) if (k >= 0x88) { // it's a non-printing key (not a modifier)
k = k - 0x88; k = k - 0x88;
} else if (k >= 0x80) { // it's a modifier key } else if (k >= 0x80) { // it's a modifier key
@ -298,7 +297,6 @@ size_t USBHIDKeyboard::press(uint8_t k)
// it shouldn't be repeated any more. // it shouldn't be repeated any more.
size_t USBHIDKeyboard::release(uint8_t k) size_t USBHIDKeyboard::release(uint8_t k)
{ {
uint8_t i;
if (k >= 0x88) { // it's a non-printing key (not a modifier) if (k >= 0x88) { // it's a non-printing key (not a modifier)
k = k - 0x88; k = k - 0x88;
} else if (k >= 0x80) { // it's a modifier key } else if (k >= 0x80) { // it's a modifier key

View File

@ -430,12 +430,32 @@ void WebServer::send(int code, const char* content_type, const String& content)
// Can we asume the following? // Can we asume the following?
//if(code == 200 && content.length() == 0 && _contentLength == CONTENT_LENGTH_NOT_SET) //if(code == 200 && content.length() == 0 && _contentLength == CONTENT_LENGTH_NOT_SET)
// _contentLength = CONTENT_LENGTH_UNKNOWN; // _contentLength = CONTENT_LENGTH_UNKNOWN;
if (content.length() == 0) {
log_w("content length is zero");
}
_prepareHeader(header, code, content_type, content.length()); _prepareHeader(header, code, content_type, content.length());
_currentClientWrite(header.c_str(), header.length()); _currentClientWrite(header.c_str(), header.length());
if(content.length()) if(content.length())
sendContent(content); sendContent(content);
} }
void WebServer::send(int code, char* content_type, const String& content) {
send(code, (const char*)content_type, content);
}
void WebServer::send(int code, const String& content_type, const String& content) {
send(code, (const char*)content_type.c_str(), content);
}
void WebServer::send(int code, const char* content_type, const char* content)
{
const String passStr = (String)content;
if (strlen(content) != passStr.length()) {
log_e("String cast failed. Use send_P for long arrays");
}
send(code, content_type, passStr);
}
void WebServer::send_P(int code, PGM_P content_type, PGM_P content) { void WebServer::send_P(int code, PGM_P content_type, PGM_P content) {
size_t contentLength = 0; size_t contentLength = 0;
@ -460,14 +480,6 @@ void WebServer::send_P(int code, PGM_P content_type, PGM_P content, size_t conte
sendContent_P(content, contentLength); sendContent_P(content, contentLength);
} }
void WebServer::send(int code, char* content_type, const String& content) {
send(code, (const char*)content_type, content);
}
void WebServer::send(int code, const String& content_type, const String& content) {
send(code, (const char*)content_type.c_str(), content);
}
void WebServer::sendContent(const String& content) { void WebServer::sendContent(const String& content) {
sendContent(content.c_str(), content.length()); sendContent(content.c_str(), content.length());
} }

View File

@ -120,6 +120,8 @@ public:
void send(int code, const char* content_type = NULL, const String& content = String("")); void send(int code, const char* content_type = NULL, const String& content = String(""));
void send(int code, char* content_type, const String& content); void send(int code, char* content_type, const String& content);
void send(int code, const String& content_type, const String& content); void send(int code, const String& content_type, const String& content);
void send(int code, const char* content_type, const char* content);
void send_P(int code, PGM_P content_type, PGM_P content); void send_P(int code, PGM_P content_type, PGM_P content);
void send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength); void send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength);

View File

@ -18,7 +18,7 @@
void setup() void setup()
{ {
bool err = ESP_FAIL; bool err = false;
Serial.begin(115200); Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it was previously connected // Set WiFi to station mode and disconnect from an AP if it was previously connected
@ -36,7 +36,7 @@ void setup()
* https://docs.espressif.com/projects/arduino-esp32/en/latest/api/wifi.html * https://docs.espressif.com/projects/arduino-esp32/en/latest/api/wifi.html
*/ */
if(err == ESP_FAIL) { if(err == false) {
Serial.println("Dual Antenna configuration failed!"); Serial.println("Dual Antenna configuration failed!");
} else { } else {
Serial.println("Dual Antenna configuration successfuly done!"); Serial.println("Dual Antenna configuration successfuly done!");

View File

@ -3,7 +3,7 @@ version=2.0.0
author=Hristo Gochkov author=Hristo Gochkov
maintainer=Hristo Gochkov <hristo@espressif.com> maintainer=Hristo Gochkov <hristo@espressif.com>
sentence=Enables network connection (local and Internet) using the ESP32 built-in WiFi. sentence=Enables network connection (local and Internet) using the ESP32 built-in WiFi.
paragraph=With this library you can instantiate Servers, Clients and send/receive UDP packets through WiFi. The shield can connect either to open or encrypted networks (WEP, WPA). The IP address can be assigned statically or through a DHCP. The library can also manage DNS. paragraph=With this library you can instantiate Servers, Clients and send/receive UDP packets through WiFi. The shield can connect either to open or encrypted networks. The IP address can be assigned statically or through a DHCP. The library can also manage DNS.
category=Communication category=Communication
url= url=
architectures=esp32 architectures=esp32

View File

@ -47,7 +47,7 @@ extern "C" {
// ----------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------
esp_netif_t* get_esp_interface_netif(esp_interface_t interface); esp_netif_t* get_esp_interface_netif(esp_interface_t interface);
esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPAddress(), IPAddress gateway=IPAddress(), IPAddress subnet=IPAddress()); esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=INADDR_NONE, IPAddress gateway=INADDR_NONE, IPAddress subnet=INADDR_NONE, IPAddress dhcp_lease_start=INADDR_NONE);
static bool softap_config_equal(const wifi_config_t& lhs, const wifi_config_t& rhs); static bool softap_config_equal(const wifi_config_t& lhs, const wifi_config_t& rhs);
static size_t _wifi_strncpy(char * dst, const char * src, size_t dst_len){ static size_t _wifi_strncpy(char * dst, const char * src, size_t dst_len){
@ -195,7 +195,7 @@ String WiFiAPClass::softAPSSID() const
* @param gateway gateway IP * @param gateway gateway IP
* @param subnet subnet mask * @param subnet subnet mask
*/ */
bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet) bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dhcp_lease_start)
{ {
esp_err_t err = ESP_OK; esp_err_t err = ESP_OK;
@ -204,7 +204,7 @@ bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress
return false; return false;
} }
err = set_esp_interface_ip(ESP_IF_WIFI_AP, local_ip, gateway, subnet); err = set_esp_interface_ip(ESP_IF_WIFI_AP, local_ip, gateway, subnet, dhcp_lease_start);
return err == ESP_OK; return err == ESP_OK;
} }

View File

@ -38,7 +38,7 @@ class WiFiAPClass
public: public:
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4, bool ftm_responder = false); bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4, bool ftm_responder = false);
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet); bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dhcp_lease_start = INADDR_NONE);
bool softAPdisconnect(bool wifioff = false); bool softAPdisconnect(bool wifioff = false);
uint8_t softAPgetStationNum(); uint8_t softAPgetStationNum();

View File

@ -48,6 +48,7 @@ extern "C" {
#include <vector> #include <vector>
#include "sdkconfig.h" #include "sdkconfig.h"
#define _byte_swap32(num) (((num>>24)&0xff) | ((num<<8)&0xff0000) | ((num>>8)&0xff00) | ((num<<24)&0xff000000))
ESP_EVENT_DEFINE_BASE(ARDUINO_EVENTS); ESP_EVENT_DEFINE_BASE(ARDUINO_EVENTS);
/* /*
* Private (exposable) methods * Private (exposable) methods
@ -82,7 +83,7 @@ esp_err_t set_esp_interface_hostname(esp_interface_t interface, const char * hos
return ESP_FAIL; return ESP_FAIL;
} }
esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPAddress(), IPAddress gateway=IPAddress(), IPAddress subnet=IPAddress()){ esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPAddress(), IPAddress gateway=IPAddress(), IPAddress subnet=IPAddress(), IPAddress dhcp_lease_start=INADDR_NONE){
esp_netif_t *esp_netif = esp_netifs[interface]; esp_netif_t *esp_netif = esp_netifs[interface];
esp_netif_dhcp_status_t status = ESP_NETIF_DHCP_INIT; esp_netif_dhcp_status_t status = ESP_NETIF_DHCP_INIT;
esp_netif_ip_info_t info; esp_netif_ip_info_t info;
@ -138,20 +139,64 @@ esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPA
dhcps_lease_t lease; dhcps_lease_t lease;
lease.enable = true; lease.enable = true;
uint32_t dhcp_ipaddr = static_cast<uint32_t>(local_ip); uint8_t CIDR = WiFiGenericClass::calculateSubnetCIDR(subnet);
// prevents DHCP lease range to overflow subnet/24 range log_v("SoftAP: %s | Gateway: %s | DHCP Start: %s | Netmask: %s", local_ip.toString().c_str(), gateway.toString().c_str(), dhcp_lease_start.toString().c_str(), subnet.toString().c_str());
// there will be 11 addresses for DHCP to lease // netmask must have room for at least 12 IP addresses (AP + GW + 10 DHCP Leasing addresses)
uint8_t leaseStart = (uint8_t)(~subnet[3] - 12); // netmask also must be limited to the last 8 bits of IPv4, otherwise this function won't work
if ((local_ip[3]) < leaseStart) { // IDF NETIF checks netmask for the 3rd byte: https://github.com/espressif/esp-idf/blob/master/components/esp_netif/lwip/esp_netif_lwip.c#L1857-L1862
lease.start_ip.addr = dhcp_ipaddr + (1 << 24); if (CIDR > 28 || CIDR < 24) {
lease.end_ip.addr = dhcp_ipaddr + (11 << 24); log_e("Bad netmask. It must be from /24 to /28 (255.255.255. 0<->240)");
} else { return ESP_FAIL; // ESP_FAIL if initializing failed
// make range stay in the begining of the netmask range }
dhcp_ipaddr = (dhcp_ipaddr & 0x00FFFFFF); // The code below is ready for any netmask, not limited to 255.255.255.0
lease.start_ip.addr = dhcp_ipaddr + (1 << 24); uint32_t netmask = _byte_swap32(info.netmask.addr);
lease.end_ip.addr = dhcp_ipaddr + (11 << 24); uint32_t ap_ipaddr = _byte_swap32(info.ip.addr);
uint32_t dhcp_ipaddr = _byte_swap32(static_cast<uint32_t>(dhcp_lease_start));
dhcp_ipaddr = dhcp_ipaddr == 0 ? ap_ipaddr + 1 : dhcp_ipaddr;
uint32_t leaseStartMax = ~netmask - 10;
// there will be 10 addresses for DHCP to lease
lease.start_ip.addr = dhcp_ipaddr;
lease.end_ip.addr = lease.start_ip.addr + 10;
// Check if local_ip is in the same subnet as the dhcp leasing range initial address
if ((ap_ipaddr & netmask) != (dhcp_ipaddr & netmask)) {
log_e("The AP IP address (%s) and the DHCP start address (%s) must be in the same subnet",
local_ip.toString().c_str(), IPAddress(_byte_swap32(dhcp_ipaddr)).toString().c_str());
return ESP_FAIL; // ESP_FAIL if initializing failed
}
// prevents DHCP lease range to overflow subnet range
if ((dhcp_ipaddr & ~netmask) >= leaseStartMax) {
// make first DHCP lease addr stay in the begining of the netmask range
lease.start_ip.addr = (dhcp_ipaddr & netmask) + 1;
lease.end_ip.addr = lease.start_ip.addr + 10;
log_w("DHCP Lease out of range - Changing DHCP leasing start to %s", IPAddress(_byte_swap32(lease.start_ip.addr)).toString().c_str());
}
// Check if local_ip is within DHCP range
if (ap_ipaddr >= lease.start_ip.addr && ap_ipaddr <= lease.end_ip.addr) {
log_e("The AP IP address (%s) can't be within the DHCP range (%s -- %s)",
local_ip.toString().c_str(), IPAddress(_byte_swap32(lease.start_ip.addr)).toString().c_str(), IPAddress(_byte_swap32(lease.end_ip.addr)).toString().c_str());
return ESP_FAIL; // ESP_FAIL if initializing failed
}
// Check if gateway is within DHCP range
uint32_t gw_ipaddr = _byte_swap32(info.gw.addr);
bool gw_in_same_subnet = (gw_ipaddr & netmask) == (ap_ipaddr & netmask);
if (gw_in_same_subnet && gw_ipaddr >= lease.start_ip.addr && gw_ipaddr <= lease.end_ip.addr) {
log_e("The GatewayP address (%s) can't be within the DHCP range (%s -- %s)",
gateway.toString().c_str(), IPAddress(_byte_swap32(lease.start_ip.addr)).toString().c_str(), IPAddress(_byte_swap32(lease.end_ip.addr)).toString().c_str());
return ESP_FAIL; // ESP_FAIL if initializing failed
}
// all done, just revert back byte order of DHCP lease range
lease.start_ip.addr = _byte_swap32(lease.start_ip.addr);
lease.end_ip.addr = _byte_swap32(lease.end_ip.addr);
log_v("DHCP Server Range: %s to %s", IPAddress(lease.start_ip.addr).toString().c_str(), IPAddress(lease.end_ip.addr).toString().c_str());
err = tcpip_adapter_dhcps_option(
(tcpip_adapter_dhcp_option_mode_t)TCPIP_ADAPTER_OP_SET,
(tcpip_adapter_dhcp_option_id_t)ESP_NETIF_SUBNET_MASK,
(void*)&info.netmask.addr, sizeof(info.netmask.addr)
);
if(err){
log_e("DHCPS Set Netmask Failed! 0x%04x", err);
return err;
} }
log_v("DHCP Server Range: %s to %s", IPAddress(lease.start_ip.addr).toString(), IPAddress(lease.end_ip.addr).toString());
err = tcpip_adapter_dhcps_option( err = tcpip_adapter_dhcps_option(
(tcpip_adapter_dhcp_option_mode_t)TCPIP_ADAPTER_OP_SET, (tcpip_adapter_dhcp_option_mode_t)TCPIP_ADAPTER_OP_SET,
(tcpip_adapter_dhcp_option_id_t)REQUESTED_IP_ADDRESS, (tcpip_adapter_dhcp_option_id_t)REQUESTED_IP_ADDRESS,
@ -161,7 +206,6 @@ esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPA
log_e("DHCPS Set Lease Failed! 0x%04x", err); log_e("DHCPS Set Lease Failed! 0x%04x", err);
return err; return err;
} }
err = esp_netif_dhcps_start(esp_netif); err = esp_netif_dhcps_start(esp_netif);
if(err){ if(err){
log_e("DHCPS Start Failed! 0x%04x", err); log_e("DHCPS Start Failed! 0x%04x", err);
@ -195,6 +239,7 @@ esp_err_t set_esp_interface_dns(esp_interface_t interface, IPAddress main_dns=IP
return ESP_OK; return ESP_OK;
} }
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
static const char * auth_mode_str(int authmode) static const char * auth_mode_str(int authmode)
{ {
switch (authmode) { switch (authmode) {
@ -216,11 +261,21 @@ static const char * auth_mode_str(int authmode)
case WIFI_AUTH_WPA2_ENTERPRISE: case WIFI_AUTH_WPA2_ENTERPRISE:
return ("WPA2_ENTERPRISE"); return ("WPA2_ENTERPRISE");
break; break;
case WIFI_AUTH_WPA3_PSK:
return ("WPA3_PSK");
break;
case WIFI_AUTH_WPA2_WPA3_PSK:
return ("WPA2_WPA3_PSK");
break;
case WIFI_AUTH_WAPI_PSK:
return ("WPAPI_PSK");
break;
default: default:
break; break;
} }
return ("UNKNOWN"); return ("UNKNOWN");
} }
#endif
static char default_hostname[32] = {0,}; static char default_hostname[32] = {0,};
static const char * get_esp_netif_hostname(){ static const char * get_esp_netif_hostname(){
@ -286,24 +341,32 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
log_v("STA Stopped"); log_v("STA Stopped");
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_STOP; arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_STOP;
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_AUTHMODE_CHANGE) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_AUTHMODE_CHANGE) {
wifi_event_sta_authmode_change_t * event = (wifi_event_sta_authmode_change_t*)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("STA Auth Mode Changed: From: %s, To: %s", auth_mode_str(event->old_mode), auth_mode_str(event->new_mode)); wifi_event_sta_authmode_change_t * event = (wifi_event_sta_authmode_change_t*)event_data;
log_v("STA Auth Mode Changed: From: %s, To: %s", auth_mode_str(event->old_mode), auth_mode_str(event->new_mode));
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_AUTHMODE_CHANGE; arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_AUTHMODE_CHANGE;
memcpy(&arduino_event.event_info.wifi_sta_authmode_change, event_data, sizeof(wifi_event_sta_authmode_change_t)); memcpy(&arduino_event.event_info.wifi_sta_authmode_change, event_data, sizeof(wifi_event_sta_authmode_change_t));
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED) {
wifi_event_sta_connected_t * event = (wifi_event_sta_connected_t*)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("STA Connected: SSID: %s, BSSID: " MACSTR ", Channel: %u, Auth: %s", event->ssid, MAC2STR(event->bssid), event->channel, auth_mode_str(event->authmode)); wifi_event_sta_connected_t * event = (wifi_event_sta_connected_t*)event_data;
log_v("STA Connected: SSID: %s, BSSID: " MACSTR ", Channel: %u, Auth: %s", event->ssid, MAC2STR(event->bssid), event->channel, auth_mode_str(event->authmode));
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_CONNECTED; arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_CONNECTED;
memcpy(&arduino_event.event_info.wifi_sta_connected, event_data, sizeof(wifi_event_sta_connected_t)); memcpy(&arduino_event.event_info.wifi_sta_connected, event_data, sizeof(wifi_event_sta_connected_t));
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
wifi_event_sta_disconnected_t * event = (wifi_event_sta_disconnected_t*)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("STA Disconnected: SSID: %s, BSSID: " MACSTR ", Reason: %u", event->ssid, MAC2STR(event->bssid), event->reason); wifi_event_sta_disconnected_t * event = (wifi_event_sta_disconnected_t*)event_data;
log_v("STA Disconnected: SSID: %s, BSSID: " MACSTR ", Reason: %u", event->ssid, MAC2STR(event->bssid), event->reason);
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_DISCONNECTED; arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_DISCONNECTED;
memcpy(&arduino_event.event_info.wifi_sta_disconnected, event_data, sizeof(wifi_event_sta_disconnected_t)); memcpy(&arduino_event.event_info.wifi_sta_disconnected, event_data, sizeof(wifi_event_sta_disconnected_t));
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) { } else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("STA Got %sIP:" IPSTR, event->ip_changed?"New ":"Same ", IP2STR(&event->ip_info.ip)); ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_GOT_IP; log_v("STA Got %sIP:" IPSTR, event->ip_changed?"New ":"Same ", IP2STR(&event->ip_info.ip));
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_GOT_IP;
memcpy(&arduino_event.event_info.got_ip, event_data, sizeof(ip_event_got_ip_t)); memcpy(&arduino_event.event_info.got_ip, event_data, sizeof(ip_event_got_ip_t));
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_LOST_IP) { } else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_LOST_IP) {
log_v("STA IP Lost"); log_v("STA IP Lost");
@ -313,8 +376,10 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
* SCAN * SCAN
* */ * */
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_SCAN_DONE) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_SCAN_DONE) {
wifi_event_sta_scan_done_t * event = (wifi_event_sta_scan_done_t*)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("SCAN Done: ID: %u, Status: %u, Results: %u", event->scan_id, event->status, event->number); wifi_event_sta_scan_done_t * event = (wifi_event_sta_scan_done_t*)event_data;
log_v("SCAN Done: ID: %u, Status: %u, Results: %u", event->scan_id, event->status, event->number);
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_SCAN_DONE; arduino_event.event_id = ARDUINO_EVENT_WIFI_SCAN_DONE;
memcpy(&arduino_event.event_info.wifi_scan_done, event_data, sizeof(wifi_event_sta_scan_done_t)); memcpy(&arduino_event.event_info.wifi_scan_done, event_data, sizeof(wifi_event_sta_scan_done_t));
@ -328,24 +393,32 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
log_v("AP Stopped"); log_v("AP Stopped");
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STOP; arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STOP;
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_PROBEREQRECVED) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_PROBEREQRECVED) {
wifi_event_ap_probe_req_rx_t * event = (wifi_event_ap_probe_req_rx_t*)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("AP Probe Request: RSSI: %d, MAC: " MACSTR, event->rssi, MAC2STR(event->mac)); wifi_event_ap_probe_req_rx_t * event = (wifi_event_ap_probe_req_rx_t*)event_data;
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED; log_v("AP Probe Request: RSSI: %d, MAC: " MACSTR, event->rssi, MAC2STR(event->mac));
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED;
memcpy(&arduino_event.event_info.wifi_ap_probereqrecved, event_data, sizeof(wifi_event_ap_probe_req_rx_t)); memcpy(&arduino_event.event_info.wifi_ap_probereqrecved, event_data, sizeof(wifi_event_ap_probe_req_rx_t));
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_STACONNECTED) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_STACONNECTED) {
wifi_event_ap_staconnected_t* event = (wifi_event_ap_staconnected_t*) event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("AP Station Connected: MAC: " MACSTR ", AID: %d", MAC2STR(event->mac), event->aid); wifi_event_ap_staconnected_t* event = (wifi_event_ap_staconnected_t*) event_data;
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STACONNECTED; log_v("AP Station Connected: MAC: " MACSTR ", AID: %d", MAC2STR(event->mac), event->aid);
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STACONNECTED;
memcpy(&arduino_event.event_info.wifi_ap_staconnected, event_data, sizeof(wifi_event_ap_staconnected_t)); memcpy(&arduino_event.event_info.wifi_ap_staconnected, event_data, sizeof(wifi_event_ap_staconnected_t));
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_STADISCONNECTED) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_STADISCONNECTED) {
wifi_event_ap_stadisconnected_t* event = (wifi_event_ap_stadisconnected_t*) event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("AP Station Disconnected: MAC: " MACSTR ", AID: %d", MAC2STR(event->mac), event->aid); wifi_event_ap_stadisconnected_t* event = (wifi_event_ap_stadisconnected_t*) event_data;
log_v("AP Station Disconnected: MAC: " MACSTR ", AID: %d", MAC2STR(event->mac), event->aid);
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STADISCONNECTED; arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STADISCONNECTED;
memcpy(&arduino_event.event_info.wifi_ap_stadisconnected, event_data, sizeof(wifi_event_ap_stadisconnected_t)); memcpy(&arduino_event.event_info.wifi_ap_stadisconnected, event_data, sizeof(wifi_event_ap_stadisconnected_t));
} else if (event_base == IP_EVENT && event_id == IP_EVENT_AP_STAIPASSIGNED) { } else if (event_base == IP_EVENT && event_id == IP_EVENT_AP_STAIPASSIGNED) {
ip_event_ap_staipassigned_t * event = (ip_event_ap_staipassigned_t*)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("AP Station IP Assigned:" IPSTR, IP2STR(&event->ip)); ip_event_ap_staipassigned_t * event = (ip_event_ap_staipassigned_t*)event_data;
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED; log_v("AP Station IP Assigned:" IPSTR, IP2STR(&event->ip));
#endif
arduino_event.event_id = ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED;
memcpy(&arduino_event.event_info.wifi_ap_staipassigned, event_data, sizeof(ip_event_ap_staipassigned_t)); memcpy(&arduino_event.event_info.wifi_ap_staipassigned, event_data, sizeof(ip_event_ap_staipassigned_t));
/* /*
@ -353,7 +426,6 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
* */ * */
} else if (event_base == ETH_EVENT && event_id == ETHERNET_EVENT_CONNECTED) { } else if (event_base == ETH_EVENT && event_id == ETHERNET_EVENT_CONNECTED) {
log_v("Ethernet Link Up"); log_v("Ethernet Link Up");
esp_eth_handle_t eth_handle = *(esp_eth_handle_t *)event_data;
arduino_event.event_id = ARDUINO_EVENT_ETH_CONNECTED; arduino_event.event_id = ARDUINO_EVENT_ETH_CONNECTED;
memcpy(&arduino_event.event_info.eth_connected, event_data, sizeof(esp_eth_handle_t)); memcpy(&arduino_event.event_info.eth_connected, event_data, sizeof(esp_eth_handle_t));
} else if (event_base == ETH_EVENT && event_id == ETHERNET_EVENT_DISCONNECTED) { } else if (event_base == ETH_EVENT && event_id == ETHERNET_EVENT_DISCONNECTED) {
@ -366,9 +438,11 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
log_v("Ethernet Stopped"); log_v("Ethernet Stopped");
arduino_event.event_id = ARDUINO_EVENT_ETH_STOP; arduino_event.event_id = ARDUINO_EVENT_ETH_STOP;
} else if (event_base == IP_EVENT && event_id == IP_EVENT_ETH_GOT_IP) { } else if (event_base == IP_EVENT && event_id == IP_EVENT_ETH_GOT_IP) {
ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("Ethernet got %sip:" IPSTR, event->ip_changed?"new":"", IP2STR(&event->ip_info.ip)); ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;
arduino_event.event_id = ARDUINO_EVENT_ETH_GOT_IP; log_v("Ethernet got %sip:" IPSTR, event->ip_changed?"new":"", IP2STR(&event->ip_info.ip));
#endif
arduino_event.event_id = ARDUINO_EVENT_ETH_GOT_IP;
memcpy(&arduino_event.event_info.got_ip, event_data, sizeof(ip_event_got_ip_t)); memcpy(&arduino_event.event_info.got_ip, event_data, sizeof(ip_event_got_ip_t));
/* /*
@ -393,13 +467,11 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_SUCCESS) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_SUCCESS) {
arduino_event.event_id = ARDUINO_EVENT_WPS_ER_SUCCESS; arduino_event.event_id = ARDUINO_EVENT_WPS_ER_SUCCESS;
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_FAILED) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_FAILED) {
wifi_event_sta_wps_fail_reason_t * event = (wifi_event_sta_wps_fail_reason_t*)event_data;
arduino_event.event_id = ARDUINO_EVENT_WPS_ER_FAILED; arduino_event.event_id = ARDUINO_EVENT_WPS_ER_FAILED;
memcpy(&arduino_event.event_info.wps_fail_reason, event_data, sizeof(wifi_event_sta_wps_fail_reason_t)); memcpy(&arduino_event.event_info.wps_fail_reason, event_data, sizeof(wifi_event_sta_wps_fail_reason_t));
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_TIMEOUT) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_TIMEOUT) {
arduino_event.event_id = ARDUINO_EVENT_WPS_ER_TIMEOUT; arduino_event.event_id = ARDUINO_EVENT_WPS_ER_TIMEOUT;
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_PIN) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_PIN) {
wifi_event_sta_wps_er_pin_t * event = (wifi_event_sta_wps_er_pin_t*)event_data;
arduino_event.event_id = ARDUINO_EVENT_WPS_ER_PIN; arduino_event.event_id = ARDUINO_EVENT_WPS_ER_PIN;
memcpy(&arduino_event.event_info.wps_er_pin, event_data, sizeof(wifi_event_sta_wps_er_pin_t)); memcpy(&arduino_event.event_info.wps_er_pin, event_data, sizeof(wifi_event_sta_wps_er_pin_t));
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_PBC_OVERLAP) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_WPS_ER_PBC_OVERLAP) {
@ -409,7 +481,6 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
* FTM * FTM
* */ * */
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_FTM_REPORT) { } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_FTM_REPORT) {
wifi_event_ftm_report_t * event = (wifi_event_ftm_report_t*)event_data;
arduino_event.event_id = ARDUINO_EVENT_WIFI_FTM_REPORT; arduino_event.event_id = ARDUINO_EVENT_WIFI_FTM_REPORT;
memcpy(&arduino_event.event_info.wifi_ftm_report, event_data, sizeof(wifi_event_ftm_report_t)); memcpy(&arduino_event.event_info.wifi_ftm_report, event_data, sizeof(wifi_event_ftm_report_t));
@ -424,8 +495,10 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
log_v("SC Found Channel"); log_v("SC Found Channel");
arduino_event.event_id = ARDUINO_EVENT_SC_FOUND_CHANNEL; arduino_event.event_id = ARDUINO_EVENT_SC_FOUND_CHANNEL;
} else if (event_base == SC_EVENT && event_id == SC_EVENT_GOT_SSID_PSWD) { } else if (event_base == SC_EVENT && event_id == SC_EVENT_GOT_SSID_PSWD) {
smartconfig_event_got_ssid_pswd_t *event = (smartconfig_event_got_ssid_pswd_t *)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
log_v("SC: SSID: %s, Password: %s", (const char *)event->ssid, (const char *)event->password); smartconfig_event_got_ssid_pswd_t *event = (smartconfig_event_got_ssid_pswd_t *)event_data;
log_v("SC: SSID: %s, Password: %s", (const char *)event->ssid, (const char *)event->password);
#endif
arduino_event.event_id = ARDUINO_EVENT_SC_GOT_SSID_PSWD; arduino_event.event_id = ARDUINO_EVENT_SC_GOT_SSID_PSWD;
memcpy(&arduino_event.event_info.sc_got_ssid_pswd, event_data, sizeof(smartconfig_event_got_ssid_pswd_t)); memcpy(&arduino_event.event_info.sc_got_ssid_pswd, event_data, sizeof(smartconfig_event_got_ssid_pswd_t));
@ -450,13 +523,17 @@ static void _arduino_event_cb(void* arg, esp_event_base_t event_base, int32_t ev
wifi_prov_mgr_deinit(); wifi_prov_mgr_deinit();
arduino_event.event_id = ARDUINO_EVENT_PROV_END; arduino_event.event_id = ARDUINO_EVENT_PROV_END;
} else if (event_base == WIFI_PROV_EVENT && event_id == WIFI_PROV_CRED_RECV) { } else if (event_base == WIFI_PROV_EVENT && event_id == WIFI_PROV_CRED_RECV) {
wifi_sta_config_t *event = (wifi_sta_config_t *)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("Provisioned Credentials: SSID: %s, Password: %s", (const char *) event->ssid, (const char *) event->password); wifi_sta_config_t *event = (wifi_sta_config_t *)event_data;
log_v("Provisioned Credentials: SSID: %s, Password: %s", (const char *) event->ssid, (const char *) event->password);
#endif
arduino_event.event_id = ARDUINO_EVENT_PROV_CRED_RECV; arduino_event.event_id = ARDUINO_EVENT_PROV_CRED_RECV;
memcpy(&arduino_event.event_info.prov_cred_recv, event_data, sizeof(wifi_sta_config_t)); memcpy(&arduino_event.event_info.prov_cred_recv, event_data, sizeof(wifi_sta_config_t));
} else if (event_base == WIFI_PROV_EVENT && event_id == WIFI_PROV_CRED_FAIL) { } else if (event_base == WIFI_PROV_EVENT && event_id == WIFI_PROV_CRED_FAIL) {
wifi_prov_sta_fail_reason_t *reason = (wifi_prov_sta_fail_reason_t *)event_data; #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
log_e("Provisioning Failed: Reason : %s", (*reason == WIFI_PROV_STA_AUTH_ERROR)?"Authentication Failed":"AP Not Found"); wifi_prov_sta_fail_reason_t *reason = (wifi_prov_sta_fail_reason_t *)event_data;
log_e("Provisioning Failed: Reason : %s", (*reason == WIFI_PROV_STA_AUTH_ERROR)?"Authentication Failed":"AP Not Found");
#endif
arduino_event.event_id = ARDUINO_EVENT_PROV_CRED_FAIL; arduino_event.event_id = ARDUINO_EVENT_PROV_CRED_FAIL;
memcpy(&arduino_event.event_info.prov_fail_reason, event_data, sizeof(wifi_prov_sta_fail_reason_t)); memcpy(&arduino_event.event_info.prov_fail_reason, event_data, sizeof(wifi_prov_sta_fail_reason_t));
} else if (event_base == WIFI_PROV_EVENT && event_id == WIFI_PROV_CRED_SUCCESS) { } else if (event_base == WIFI_PROV_EVENT && event_id == WIFI_PROV_CRED_SUCCESS) {
@ -1259,6 +1336,7 @@ bool WiFiGenericClass::setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2
// Set antenna default configuration // Set antenna default configuration
wifi_ant_config_t ant_config = { wifi_ant_config_t ant_config = {
.rx_ant_mode = WIFI_ANT_MODE_AUTO, .rx_ant_mode = WIFI_ANT_MODE_AUTO,
.rx_ant_default = WIFI_ANT_MAX, // Ignored in AUTO mode
.tx_ant_mode = WIFI_ANT_MODE_AUTO, .tx_ant_mode = WIFI_ANT_MODE_AUTO,
.enabled_ant0 = 0, .enabled_ant0 = 0,
.enabled_ant1 = 1, .enabled_ant1 = 1,

View File

@ -51,7 +51,7 @@ extern "C" {
esp_netif_t* get_esp_interface_netif(esp_interface_t interface); esp_netif_t* get_esp_interface_netif(esp_interface_t interface);
esp_err_t set_esp_interface_dns(esp_interface_t interface, IPAddress main_dns=IPAddress(), IPAddress backup_dns=IPAddress(), IPAddress fallback_dns=IPAddress()); esp_err_t set_esp_interface_dns(esp_interface_t interface, IPAddress main_dns=IPAddress(), IPAddress backup_dns=IPAddress(), IPAddress fallback_dns=IPAddress());
esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=IPAddress(), IPAddress gateway=IPAddress(), IPAddress subnet=IPAddress()); esp_err_t set_esp_interface_ip(esp_interface_t interface, IPAddress local_ip=INADDR_NONE, IPAddress gateway=INADDR_NONE, IPAddress subnet=INADDR_NONE, IPAddress dhcp_lease_start=INADDR_NONE);
static bool sta_config_equal(const wifi_config_t& lhs, const wifi_config_t& rhs); static bool sta_config_equal(const wifi_config_t& lhs, const wifi_config_t& rhs);
static size_t _wifi_strncpy(char * dst, const char * src, size_t dst_len){ static size_t _wifi_strncpy(char * dst, const char * src, size_t dst_len){

View File

@ -42,33 +42,6 @@ extern "C" {
#include "lwip/err.h" #include "lwip/err.h"
} }
static const char * cipher_str(int cipher)
{
switch (cipher) {
case WIFI_CIPHER_TYPE_NONE:
return ("NONE");
break;
case WIFI_CIPHER_TYPE_WEP40:
return ("WEP40");
break;
case WIFI_CIPHER_TYPE_WEP104:
return ("WEP104");
break;
case WIFI_CIPHER_TYPE_TKIP:
return ("TKIP");
break;
case WIFI_CIPHER_TYPE_CCMP:
return ("CCMP");
break;
case WIFI_CIPHER_TYPE_TKIP_CCMP:
return ("TKIP_CCMP");
break;
default:
break;
}
return ("UNKNOWN");
}
bool WiFiScanClass::_scanAsync = false; bool WiFiScanClass::_scanAsync = false;
uint32_t WiFiScanClass::_scanStarted = 0; uint32_t WiFiScanClass::_scanStarted = 0;
uint32_t WiFiScanClass::_scanTimeout = 10000; uint32_t WiFiScanClass::_scanTimeout = 10000;

View File

@ -22,8 +22,6 @@
#define BUNDLE_HEADER_OFFSET 2 #define BUNDLE_HEADER_OFFSET 2
#define CRT_HEADER_OFFSET 4 #define CRT_HEADER_OFFSET 4
static const char *TAG = "esp-x509-crt-bundle";
/* a dummy certificate so that /* a dummy certificate so that
* cacert_ptr passes non-NULL check during handshake */ * cacert_ptr passes non-NULL check during handshake */
static mbedtls_x509_crt s_dummy_crt; static mbedtls_x509_crt s_dummy_crt;

View File

@ -66,15 +66,6 @@ static void get_device_service_name(prov_scheme_t prov_scheme, char *service_nam
#endif #endif
} }
static esp_err_t custom_prov_data_handler(uint32_t session_id, const uint8_t *inbuf, ssize_t inlen, uint8_t **outbuf, ssize_t *outlen, void *priv_data){
if (inbuf) {
log_d("Received data: %.*s", inlen, (char *)inbuf);
}
*outbuf = NULL;
*outlen = 0;
return ESP_OK;
}
void WiFiProvClass :: beginProvision(prov_scheme_t prov_scheme, scheme_handler_t scheme_handler, wifi_prov_security_t security, const char * pop, const char *service_name, const char *service_key, uint8_t * uuid) void WiFiProvClass :: beginProvision(prov_scheme_t prov_scheme, scheme_handler_t scheme_handler, wifi_prov_security_t security, const char * pop, const char *service_name, const char *service_key, uint8_t * uuid)
{ {
bool provisioned = false; bool provisioned = false;

View File

@ -374,6 +374,9 @@ size_t TwoWire::requestFrom(uint16_t address, size_t size, bool sendStop)
rxIndex = 0; rxIndex = 0;
rxLength = 0; rxLength = 0;
err = i2cWriteReadNonStop(num, address, txBuffer, txLength, rxBuffer, size, _timeOutMillis, &rxLength); err = i2cWriteReadNonStop(num, address, txBuffer, txLength, rxBuffer, size, _timeOutMillis, &rxLength);
if(err){
log_e("i2cWriteReadNonStop returned Error %d", err);
}
} else { } else {
#if !CONFIG_DISABLE_HAL_LOCKS #if !CONFIG_DISABLE_HAL_LOCKS
//acquire lock //acquire lock
@ -385,6 +388,9 @@ size_t TwoWire::requestFrom(uint16_t address, size_t size, bool sendStop)
rxIndex = 0; rxIndex = 0;
rxLength = 0; rxLength = 0;
err = i2cRead(num, address, rxBuffer, size, _timeOutMillis, &rxLength); err = i2cRead(num, address, rxBuffer, size, _timeOutMillis, &rxLength);
if(err){
log_e("i2cRead returned Error %d", err);
}
} }
#if !CONFIG_DISABLE_HAL_LOCKS #if !CONFIG_DISABLE_HAL_LOCKS
//release lock //release lock

View File

@ -1,6 +1,6 @@
{ {
"name": "framework-arduinoespressif32", "name": "framework-arduinoespressif32",
"version": "2.0.3", "version": "2.0.4",
"description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs", "description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs",
"keywords": [ "keywords": [
"framework", "framework",

View File

@ -1,5 +1,5 @@
name=ESP32 Arduino name=ESP32 Arduino
version=2.0.3 version=2.0.4
runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
runtime.tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf runtime.tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf
@ -86,9 +86,9 @@ build.extra_flags.esp32c3=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build.
# Compile Flags # Compile Flags
compiler.cpreprocessor.flags={compiler.cpreprocessor.flags.{build.mcu}} "-I{compiler.sdk.path}/{build.memory_type}/include" compiler.cpreprocessor.flags={compiler.cpreprocessor.flags.{build.mcu}} "-I{compiler.sdk.path}/{build.memory_type}/include"
compiler.c.flags={compiler.c.flags.{build.mcu}} compiler.c.flags={compiler.c.flags.{build.mcu}} {compiler.warning_flags}
compiler.cpp.flags={compiler.cpp.flags.{build.mcu}} compiler.cpp.flags={compiler.cpp.flags.{build.mcu}} {compiler.warning_flags}
compiler.S.flags={compiler.S.flags.{build.mcu}} compiler.S.flags={compiler.S.flags.{build.mcu}} {compiler.warning_flags}
compiler.c.elf.flags={compiler.c.elf.flags.{build.mcu}} compiler.c.elf.flags={compiler.c.elf.flags.{build.mcu}}
compiler.c.elf.libs={compiler.c.elf.libs.{build.mcu}} compiler.c.elf.libs={compiler.c.elf.libs.{build.mcu}}
compiler.ar.flags={compiler.ar.flags.{build.mcu}} compiler.ar.flags={compiler.ar.flags.{build.mcu}}

View File

@ -0,0 +1,2 @@
def test_timer(dut):
dut.expect_unity_test_output(timeout=240)

110
tests/timer/timer.ino Normal file
View File

@ -0,0 +1,110 @@
/* HW Timer test */
#include <unity.h>
#define TIMER_DIVIDER 16
#define TIMER_SCALE (APB_CLK_FREQ / TIMER_DIVIDER)
hw_timer_t * timer = NULL;
static volatile bool alarm_flag;
/* These functions are intended to be called before and after each test. */
void setUp(void) {
timer = timerBegin(0, TIMER_DIVIDER, true);
timerStop(timer);
timerRestart(timer);
}
void tearDown(void){
timerEnd(timer);
}
void ARDUINO_ISR_ATTR onTimer(){
alarm_flag = true;
}
void timer_interrupt_test(void){
alarm_flag = false;
timerAttachInterrupt(timer, &onTimer, true);
timerAlarmWrite(timer, (1.2 * TIMER_SCALE), true);
timerAlarmEnable(timer);
timerStart(timer);
delay(2000);
TEST_ASSERT_EQUAL(true, alarm_flag);
timerStop(timer);
timerRestart(timer);
alarm_flag = false;
timerAlarmDisable(timer);
timerStart(timer);
delay(2000);
TEST_ASSERT_EQUAL(false, alarm_flag);
}
void timer_divider_test(void){
uint64_t time_val;
uint64_t comp_time_val;
timerStart(timer);
delay(1000);
time_val = timerRead(timer);
// compare divider 16 and 8, value should be double
timerStop(timer);
timerSetDivider(timer,8);
timerRestart(timer);
timerStart(timer);
delay(1000);
comp_time_val = timerRead(timer);
TEST_ASSERT_INT_WITHIN(5000, 5000000, time_val);
TEST_ASSERT_INT_WITHIN(10000, 10000000, comp_time_val);
// divider is 256, value should be 2^4
timerStop(timer);
timerSetDivider(timer,256);
timerRestart(timer);
timerStart(timer);
delay(1000);
comp_time_val = timerRead(timer);
TEST_ASSERT_INT_WITHIN(5000, 5000000, time_val);
TEST_ASSERT_INT_WITHIN(3126, 312500, comp_time_val);
}
void timer_read_test(void){
uint64_t set_timer_val = 0xFF;
uint64_t get_timer_val = 0;
timerWrite(timer,set_timer_val);
get_timer_val = timerRead(timer);
TEST_ASSERT_EQUAL(set_timer_val, get_timer_val);
}
void setup(){
// Open serial communications and wait for port to open:
Serial.begin(115200);
while (!Serial) {
;
}
UNITY_BEGIN();
RUN_TEST(timer_read_test);
RUN_TEST(timer_interrupt_test);
RUN_TEST(timer_divider_test);
UNITY_END();
}
void loop(){
}

View File

@ -0,0 +1,3 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 36K, 20K,
factory, app, factory, 64K, 1900K,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 36K 20K
3 factory app factory 64K 1900K

View File

@ -117,7 +117,6 @@ env.Append(
], ],
CPPPATH=[ CPPPATH=[
join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "config"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "newlib", "platform_include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "newlib", "platform_include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "freertos", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "freertos", "include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "freertos", "include", "esp_additions", "freertos"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "freertos", "include", "esp_additions", "freertos"),
@ -357,10 +356,10 @@ if "build.variant" in env.BoardConfig():
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
] ]
) )
libs.append(env.BuildLibrary( env.BuildSources(
join("$BUILD_DIR", "FrameworkArduinoVariant"), join("$BUILD_DIR", "FrameworkArduinoVariant"),
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
)) )
envsafe = env.Clone() envsafe = env.Clone()

View File

@ -116,7 +116,6 @@ env.Append(
], ],
CPPPATH=[ CPPPATH=[
join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "config"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "newlib", "platform_include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "newlib", "platform_include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "freertos", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "freertos", "include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "freertos", "include", "esp_additions", "freertos"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "freertos", "include", "esp_additions", "freertos"),
@ -350,10 +349,10 @@ if "build.variant" in env.BoardConfig():
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
] ]
) )
libs.append(env.BuildLibrary( env.BuildSources(
join("$BUILD_DIR", "FrameworkArduinoVariant"), join("$BUILD_DIR", "FrameworkArduinoVariant"),
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
)) )
envsafe = env.Clone() envsafe = env.Clone()

View File

@ -113,7 +113,6 @@ env.Append(
], ],
CPPPATH=[ CPPPATH=[
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "config"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "newlib", "platform_include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "newlib", "platform_include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "freertos", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "freertos", "include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "freertos", "include", "esp_additions", "freertos"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "freertos", "include", "esp_additions", "freertos"),
@ -352,10 +351,10 @@ if "build.variant" in env.BoardConfig():
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
] ]
) )
libs.append(env.BuildLibrary( env.BuildSources(
join("$BUILD_DIR", "FrameworkArduinoVariant"), join("$BUILD_DIR", "FrameworkArduinoVariant"),
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
)) )
envsafe = env.Clone() envsafe = env.Clone()

View File

@ -113,7 +113,6 @@ env.Append(
], ],
CPPPATH=[ CPPPATH=[
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "config"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "newlib", "platform_include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "newlib", "platform_include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "freertos", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "freertos", "include"),
join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "freertos", "include", "esp_additions", "freertos"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "freertos", "include", "esp_additions", "freertos"),
@ -369,10 +368,10 @@ if "build.variant" in env.BoardConfig():
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
] ]
) )
libs.append(env.BuildLibrary( env.BuildSources(
join("$BUILD_DIR", "FrameworkArduinoVariant"), join("$BUILD_DIR", "FrameworkArduinoVariant"),
join(variants_dir, env.BoardConfig().get("build.variant")) join(variants_dir, env.BoardConfig().get("build.variant"))
)) )
envsafe = env.Clone() envsafe = env.Clone()

View File

@ -0,0 +1,42 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define EXTERNAL_NUM_INTERRUPTS 22
#define NUM_DIGITAL_PINS 22
#define NUM_ANALOG_INPUTS 6
#define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1)
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS)
static const uint8_t TX = 21;
static const uint8_t RX = 20;
static const uint8_t SDA = 6;
static const uint8_t SCL = 7;
static const uint8_t SS = 20;
static const uint8_t MOSI = 10;
static const uint8_t MISO = 9;
static const uint8_t SCK = 8;
static const uint8_t A0 = 2;
static const uint8_t A1 = 3;
static const uint8_t A2 = 4;
static const uint8_t A3 = 5;
static const uint8_t D0 = 2;
static const uint8_t D1 = 3;
static const uint8_t D2 = 4;
static const uint8_t D3 = 5;
static const uint8_t D4 = 6;
static const uint8_t D5 = 7;
static const uint8_t D6 = 21;
static const uint8_t D7 = 20;
static const uint8_t D8 = 8;
static const uint8_t D9 = 9;
static const uint8_t D10 = 10;
#endif /* Pins_Arduino_h */

Some files were not shown because too many files have changed in this diff Show More