Skip to content

sync #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 101 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
676f5cf
fix UART FIFO test for being full (#5390)
SuGlider Jul 16, 2021
cf6ab9c
component: Remove circular dependency around 'main' (#5391)
projectgus Jul 16, 2021
dd25e2b
Fix some WiFi issues (#5395)
me-no-dev Jul 16, 2021
c8a4010
Rename LITTLEFS to LittleFS to match ESP8266 (#5396)
me-no-dev Jul 16, 2021
5eda278
Update camera example (#5397)
me-no-dev Jul 16, 2021
a9bd39d
Fix pin attenuation being overwritten (#5399)
me-no-dev Jul 16, 2021
eac8b2d
fix port{Input,Output,Mode}Register macros for chips with <=32 pins (…
igrr Jul 16, 2021
780588d
Remove undocumented and uncontrollable WiFI RSSI filter. (#5393)
rtrbt Jul 16, 2021
16f4b0f
IDF master d93887f9f (#5336)
me-no-dev Jul 16, 2021
0aafa05
Added function to retrieve the amount of data received from an BLECha…
xBiohazardx Jul 16, 2021
d9833f9
Remove mkfatfs tool from package json
me-no-dev Jul 18, 2021
1effae4
Docs: Initial documentation structure using Sphinx (#5355)
pedrominatel Jul 19, 2021
f64ca2e
Fixed typo in comments. (#5407)
Sagar73594 Jul 19, 2021
db4e766
add callback to HTTPUpdate (#5408)
jayanta525 Jul 19, 2021
f79411f
Links to the new docs updated and new docs build badge added
pedrominatel Jul 19, 2021
49df877
Merge pull request #5417 from pedrominatel/docs/readme_docs_update
VojtechBartoska Jul 19, 2021
6393dbc
Fix gh-pages update script
me-no-dev Jul 19, 2021
4a0305a
Fixes SD begin() end() memory leak #2897 (#5419)
SuGlider Jul 19, 2021
268595c
Various USB fixes (#5422)
me-no-dev Jul 20, 2021
4ada3f5
Fix Windows USB issues
me-no-dev Jul 20, 2021
b974fbd
Fix wdt OTA update
Jason2866 Jul 20, 2021
e12d8c8
fix: WiFiClientSecure connection timeout (#5398) (#5418)
vlastahajek Jul 21, 2021
cd56d8d
Fix ESP32-Solo WDT on HTTP OTA update
Jason2866 Jul 21, 2021
5458df0
Fixes Serial.end() hanging on ESP32-S2 (#5434)
SuGlider Jul 21, 2021
ee24736
Update README.md
me-no-dev Jul 22, 2021
34125ce
Examples update, add a note for configTime() that only one ntp server…
vortigont Jul 22, 2021
6e47e18
Add files via upload (#5433)
nqh2412 Jul 22, 2021
51e9c0b
IDF master c69f0ec32
me-no-dev Jul 25, 2021
dce7bc9
Merge branch 'espressif:master' into master
Jason2866 Jul 25, 2021
7db15b4
Fix WDT only for solo core
Jason2866 Jul 25, 2021
f3600ac
Merge pull request #9 from espressif/idf-master
Jason2866 Jul 25, 2021
e0e5c88
Create PULL_REQUEST_TEMPLATE.md (#5439)
VojtechBartoska Jul 26, 2021
6972695
IDF master c69f0ec32 (#5449)
me-no-dev Jul 26, 2021
1775dd1
Add ReadTheDocs CI (#5456)
me-no-dev Jul 26, 2021
3780b5c
Unbreak integer to string conversion functions. (#5423) (#5438)
rtrbt Jul 26, 2021
5334075
Merge branch 'espressif:master' into master
Jason2866 Jul 26, 2021
d5a98f9
Doc: Updated Troubleshooting file (#5430)
Sagar73594 Jul 26, 2021
65eafd1
Fixes ESP32-S2 LEDC PWM #5375 #5050 (#5452)
SuGlider Jul 26, 2021
43a39f7
Merge branch 'espressif:master' into master
Jason2866 Jul 26, 2021
9406f8e
Weaken tinyusb callbacks (#5475)
chegewara Jul 29, 2021
c5a1f3e
Corrected CLASSIC_BT_ENABLED to CONFIG_BT_CLASSIC_ENABLED. (#5471)
pulquero Jul 29, 2021
505926c
IDF master 58022f859
me-no-dev Jul 29, 2021
023ae75
Rework pulseIn to work on ESP32-C3
me-no-dev Aug 2, 2021
4365a45
Fix WiFi Deinit bug
me-no-dev Aug 2, 2021
31127f4
Support for Transfer-Encoding headers that specify "identify" (#5486)
Aug 2, 2021
be84c82
[WiFiClient] Default connection timeout, when no timeout provided (#5…
cziter15 Aug 2, 2021
5bb8177
Add initial support for USB MSC (#5466)
me-no-dev Aug 2, 2021
0174bf2
IDF master 606557b48
me-no-dev Aug 4, 2021
c8a8313
IDF master 8131d6f46
me-no-dev Aug 5, 2021
5b04b60
IDF master 59aa60d52
me-no-dev Aug 6, 2021
5614564
IDF master 83956ebba
me-no-dev Aug 7, 2021
a7fd5f6
IDF master 83956ebbae
me-no-dev Aug 10, 2021
5fd7379
Fix wrong attenuation being set to pins (#5522)
me-no-dev Aug 11, 2021
0b0dfab
Fix race in log_printf (#5523)
me-no-dev Aug 11, 2021
0acbe78
Increase default timeout for WiFiClient from 3ms to 3s (#5496)
drzony Aug 11, 2021
c4fcab2
Fix issue #5506 "WebServer serveStatic () can cause LoadProhibited ex…
timr49 Aug 11, 2021
a4118ea
Add ET-Board BUILTIN_LED pin (#5490)
ketri2484 Aug 11, 2021
0d5a12f
IDF master b1c3ee71c5
me-no-dev Aug 12, 2021
e5bd18d
Fix I2C Scan for S2 and C3 (#5528)
me-no-dev Aug 12, 2021
2af8cc3
Fixes Touchpad Interrupt (#5527)
SuGlider Aug 12, 2021
29cd5cd
IDF master 2c49af9e75
me-no-dev Aug 12, 2021
8fe7dce
Merge branch 'espressif:master' into master
Jason2866 Aug 12, 2021
fa81335
IDF master eb1a66e7c9
me-no-dev Aug 13, 2021
dc0ff8c
IDF master a20df743f1
me-no-dev Aug 13, 2021
a7ea737
Added LOLIN boards o the boards list.
pedrominatel Aug 16, 2021
b580bb2
Add log_buf to pretty print buffers
me-no-dev Aug 17, 2021
44dd99f
Merge branch 'master' into docs/wemos_boards
pedrominatel Aug 18, 2021
000d967
Merge pull request #5547 from pedrominatel/docs/wemos_boards
pedrominatel Aug 18, 2021
90c01da
Fix build error in ESP-IDF
me-no-dev Aug 19, 2021
ce68070
Fixed the external link to a new tab (LOLIN boards) (#5571)
pedrominatel Aug 23, 2021
78499c4
Added Franzininho WiFi board support (#5570)
pedrominatel Aug 23, 2021
29455a0
Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int…
timr49 Aug 23, 2021
94809ce
fix: timerRead() is returning the last read value, not the actual #34…
LoriLori Aug 23, 2021
e265bd0
Add new board (Deneyap Mini) (#5531)
zeynepdicle Aug 23, 2021
8785335
Add SparkFun ESP32 MicroMod microcontroller (#5556)
seanhagen Aug 23, 2021
929cf2c
Add ATMegaZero ESP32-S2 microcontroller (#5569)
eddieespinal Aug 23, 2021
b1d072d
Implements UART SerialHardware Refactoring on top of IDF (#5549)
SuGlider Aug 23, 2021
c45cff5
Implement USB HID Device Support for ESP32-S2 (#5538)
me-no-dev Aug 23, 2021
0730e0e
Include nvs_commit() on three methods (#5309)
beamholder Aug 23, 2021
1f59c5a
Adds HardwareSerial::setRxBufferSize() (#5583)
SuGlider Aug 24, 2021
a62979d
Add missing upload.flags (#5589)
riosnav Aug 25, 2021
9ced459
Fix build compilation due to changes in the HW_TIMER's structs
me-no-dev Aug 30, 2021
249a3e2
Merge branch 'master' into idf-master
me-no-dev Aug 30, 2021
82404b0
Fix compilation warnings and errors with USB
me-no-dev Aug 30, 2021
c6ff727
Update USBCDC.cpp
me-no-dev Aug 30, 2021
f5fee39
Update CMakeLists.txt
me-no-dev Aug 30, 2021
9afc0bd
IDF master b63ec47238
me-no-dev Aug 30, 2021
b05f3f5
Update libarduino_tinyusb.a
me-no-dev Aug 30, 2021
4a55ff9
Add support for the hardware CDC in ESP32-C3 (#5614)
me-no-dev Aug 31, 2021
24b76cb
Add string constructor and concat routines taking explicit length arg…
rcombs Aug 31, 2021
9eea85f
Check if m_pServerCallbacks is not null before calling method. (#5603)
Marcus10110 Aug 31, 2021
44c1198
Added UM FeatherS2 Neo to boards.txt and added appropriate variants. …
UnexpectedMaker Aug 31, 2021
6c72afd
Merge branch 'master' into idf-master
me-no-dev Aug 31, 2021
0101877
Update HWCDC.cpp
me-no-dev Aug 31, 2021
453af38
Supported devices table updated due the 2.0.0 release
pedrominatel Aug 31, 2021
92ce408
Merge pull request #5616 from pedrominatel/docs/update_for_release_2-0-0
pedrominatel Aug 31, 2021
6ed9294
IDF master 5f38b766a8
me-no-dev Sep 1, 2021
b3c651c
IDF master b1f851b8f8
me-no-dev Sep 1, 2021
5641a10
IDF master 61299f879e
me-no-dev Sep 2, 2021
52404b4
Merge branch 'espressif:master' into master
Jason2866 Sep 2, 2021
48fb4e4
Merge pull request #14 from espressif/idf-master
Jason2866 Sep 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
----------------------------------------------------------------------------------------------------------------------------------------------------
This entire section can be deleted if all items are checked.

*By completing this PR sufficiently, you help us to improve the quality of Release Notes*

### Checklist

1. [ ] Please provide specific title of the PR describing the change, including the component name (eg."Update of Documentation link on Readme.md")
2. [ ] Please provide related links (eg. Issue, other Project, submodule PR..)
----------------------------------------------------------------------------------------------------------------------------------------------------

## Summary
Please describe your proposed PR and what it contains.

## Impact
Please describe impact of your PR and it's function.
36 changes: 30 additions & 6 deletions .github/scripts/install-platformio-esp32.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
#!/bin/bash

export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git#feature/idf-master"
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master"

XTENSA32_TOOLCHAIN_VERSION="8.4.0+2021r1"
XTENSA32S2_TOOLCHAIN_VERSION="8.4.0+2021r1"
RISCV_TOOLCHAIN_VERSION="8.4.0+2021r1"
ESPTOOLPY_VERSION="~1.30100.0"
ESPRESSIF_ORGANIZATION_NAME="espressif"

echo "Installing Python Wheel ..."
pip install wheel > /dev/null 2>&1

echo "Installing PlatformIO ..."
pip install -U https://github.com/platformio/platformio/archive/develop.zip > /dev/null 2>&1
pip install -U https://github.com/platformio/platformio/archive/master.zip > /dev/null 2>&1

echo "Installing Platform ESP32 ..."
python -m platformio platform install $PLATFORMIO_ESP32_URL > /dev/null 2>&1

echo "Replacing the framework version ..."
python -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoespressif32']['version'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
python -m platformio platform install $PLATFORMIO_ESP32_URL > /dev/null 2>&1

echo "Replacing the package versions ..."
replace_script="import json; import os;"
replace_script+="fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+');"
replace_script+="data=json.load(fp);"
# Use framework sources from the repository
replace_script+="data['packages']['framework-arduinoespressif32']['version'] = '*';"
replace_script+="del data['packages']['framework-arduinoespressif32']['owner'];"
# Use toolchain packages from the "espressif" organization
replace_script+="data['packages']['toolchain-xtensa-esp32']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
replace_script+="data['packages']['toolchain-riscv32-esp']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
# Update versions to use the upstream
replace_script+="data['packages']['toolchain-xtensa-esp32']['version']='$XTENSA32_TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['version']='$XTENSA32S2_TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-riscv32-esp']['version']='$RISCV_TOOLCHAIN_VERSION';"
# esptool.py may require an upstream version (for now platformio is the owner)
replace_script+="data['packages']['tool-esptoolpy']['version']='$ESPTOOLPY_VERSION';"
# Save results
replace_script+="fp.seek(0);fp.truncate();json.dump(data, fp, indent=2);fp.close()"
python -c "$replace_script"

if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
echo "Linking Core..."
Expand Down
100 changes: 53 additions & 47 deletions .github/scripts/on-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,53 +85,59 @@ function git_safe_upload_to_pages(){
return $?
}

EVENT_JSON=`cat $GITHUB_EVENT_PATH`

echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
echo "EVENT_JSON: $EVENT_JSON"

pages_added=`echo "$EVENT_JSON" | jq -r '.commits[].added[]'`
echo "added: $pages_added"
pages_modified=`echo "$EVENT_JSON" | jq -r '.commits[].modified[]'`
echo "modified: $pages_modified"
pages_removed=`echo "$EVENT_JSON" | jq -r '.commits[].removed[]'`
echo "removed: $pages_removed"

for page in $pages_added; do
if [[ $page != "README.md" && $page != "docs/"* ]]; then
continue
fi
echo "Adding '$page' to pages ..."
if [[ $page == "README.md" ]]; then
git_safe_upload_to_pages "index.md" "README.md"
else
git_safe_upload_to_pages "$page" "$page"
fi
done

for page in $pages_modified; do
if [[ $page != "README.md" && $page != "docs/"* ]]; then
continue
fi
echo "Modifying '$page' ..."
if [[ $page == "README.md" ]]; then
git_safe_upload_to_pages "index.md" "README.md"
else
git_safe_upload_to_pages "$page" "$page"
fi
done

for page in $pages_removed; do
if [[ $page != "README.md" && $page != "docs/"* ]]; then
continue
fi
echo "Removing '$page' from pages ..."
if [[ $page == "README.md" ]]; then
git_remove_from_pages "README.md" > /dev/null
else
git_remove_from_pages "$page" > /dev/null
fi
done
git_safe_upload_to_pages "index.md" "README.md"

# At some point github stopped providing a list of edited file
# but we also stopped havong documentation in md format,
# so we can skip this portion safely and update just the index

# EVENT_JSON=`cat $GITHUB_EVENT_PATH`

# echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
# echo "EVENT_JSON: $EVENT_JSON"

# pages_added=`echo "$EVENT_JSON" | jq -r '.commits[].added[]'`
# echo "added: $pages_added"
# pages_modified=`echo "$EVENT_JSON" | jq -r '.commits[].modified[]'`
# echo "modified: $pages_modified"
# pages_removed=`echo "$EVENT_JSON" | jq -r '.commits[].removed[]'`
# echo "removed: $pages_removed"

# for page in $pages_added; do
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
# continue
# fi
# echo "Adding '$page' to pages ..."
# if [[ $page == "README.md" ]]; then
# git_safe_upload_to_pages "index.md" "README.md"
# else
# git_safe_upload_to_pages "$page" "$page"
# fi
# done

# for page in $pages_modified; do
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
# continue
# fi
# echo "Modifying '$page' ..."
# if [[ $page == "README.md" ]]; then
# git_safe_upload_to_pages "index.md" "README.md"
# else
# git_safe_upload_to_pages "$page" "$page"
# fi
# done

# for page in $pages_removed; do
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
# continue
# fi
# echo "Removing '$page' from pages ..."
# if [[ $page == "README.md" ]]; then
# git_remove_from_pages "README.md" > /dev/null
# else
# git_remove_from_pages "$page" > /dev/null
# fi
# done

echo
echo "DONE!"
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: ReadTheDocs CI

on:
push:
branches:
- master
- release/*
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'

jobs:

build-docs:
name: Build ReadTheDocs
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Build
run: |
sudo apt update
sudo apt install python3-pip python3-setuptools
# GitHub CI installs pip3 and setuptools outside the path.
# Update the path to include them and run.
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r ./docs/requirements.txt
cd ./docs && PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" make html
1 change: 0 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- pages
paths:
- 'README.md'
- 'docs/**'
- '.github/scripts/on-pages.sh'
- '.github/workflows/gh-pages.yml'

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ __vm/
.vscode/
platform.sloeber.txt
boards.sloeber.txt

# Ignore docs build (Sphinx)
docs/build
72 changes: 55 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ set(CORE_SRCS
cores/esp32/stdlib_noniso.c
cores/esp32/Stream.cpp
cores/esp32/StreamString.cpp
cores/esp32/HWCDC.cpp
cores/esp32/USB.cpp
cores/esp32/USBCDC.cpp
cores/esp32/USBMSC.cpp
cores/esp32/FirmwareMSC.cpp
cores/esp32/firmware_msc_fat.c
cores/esp32/wiring_pulse.c
cores/esp32/wiring_shift.c
cores/esp32/WMath.cpp
Expand All @@ -55,7 +59,7 @@ set(LIBRARY_SRCS
libraries/FS/src/vfs_api.cpp
libraries/HTTPClient/src/HTTPClient.cpp
libraries/HTTPUpdate/src/HTTPUpdate.cpp
libraries/LITTLEFS/src/LITTLEFS.cpp
libraries/LittleFS/src/LittleFS.cpp
libraries/NetBIOS/src/NetBIOS.cpp
libraries/Preferences/src/Preferences.cpp
libraries/RainMaker/src/RMaker.cpp
Expand All @@ -73,6 +77,14 @@ set(LIBRARY_SRCS
libraries/Ticker/src/Ticker.cpp
libraries/Update/src/Updater.cpp
libraries/Update/src/HttpsOTAUpdate.cpp
libraries/USB/src/USBHID.cpp
libraries/USB/src/USBHIDMouse.cpp
libraries/USB/src/USBHIDKeyboard.cpp
libraries/USB/src/USBHIDGamepad.cpp
libraries/USB/src/USBHIDConsumerControl.cpp
libraries/USB/src/USBHIDSystemControl.cpp
libraries/USB/src/USBHIDVendor.cpp
libraries/USB/src/USBVendor.cpp
libraries/WebServer/src/WebServer.cpp
libraries/WebServer/src/Parsing.cpp
libraries/WebServer/src/detail/mimetable.cpp
Expand Down Expand Up @@ -140,7 +152,7 @@ set(includedirs
libraries/FS/src
libraries/HTTPClient/src
libraries/HTTPUpdate/src
libraries/LITTLEFS/src
libraries/LittleFS/src
libraries/NetBIOS/src
libraries/Preferences/src
libraries/RainMaker/src
Expand All @@ -151,6 +163,7 @@ set(includedirs
libraries/SPI/src
libraries/Ticker/src
libraries/Update/src
libraries/USB/src
libraries/WebServer/src
libraries/WiFiClientSecure/src
libraries/WiFi/src
Expand All @@ -161,25 +174,50 @@ set(includedirs
set(srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS})
set(priv_includes cores/esp32/libb64)
set(requires spi_flash mbedtls mdns esp_adc_cal wifi_provisioning nghttp)
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt main)
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt esp_ipc esp_hid)

idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})

string(TOUPPER ${CONFIG_IDF_TARGET} idf_target_caps)
target_compile_options(${COMPONENT_TARGET} PUBLIC
-DARDUINO=10812
-DARDUINO_${idf_target_caps}_DEV
-DARDUINO_ARCH_ESP32
-DARDUINO_BOARD="${idf_target_caps}_DEV"
-DARDUINO_VARIANT="${CONFIG_IDF_TARGET}"
-DESP32)

if(CONFIG_AUTOSTART_ARDUINO)
# in autostart mode, arduino-esp32 contains app_main() function and needs to
# reference setup() and loop() in the main component. If we add main
# component to priv_requires then we create a large circular dependency
# (arduino-esp32 -> main -> arduino-esp32) and can get linker errors, so
# instead we add setup() and loop() to the undefined symbols list so the
# linker will always include them.
#
# (As they are C++ symbol, we need to add the C++ mangled names.)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _Z5setupv -u _Z4loopv")
endif()

# This function adds a dependency on the given component if the component is included into the build.
function(maybe_add_component component_name)
idf_build_get_property(components BUILD_COMPONENTS)
if (${component_name} IN_LIST components)
idf_component_get_property(lib_name ${component_name} COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} PUBLIC ${lib_name})
endif()
endfunction()

if(IDF_TARGET MATCHES "esp32" AND CONFIG_ESP_RMAKER_TASK_STACK)
maybe_add_component(esp_rainmaker)
maybe_add_component(qrcode)
endif()
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
list(APPEND priv_requires arduino_tinyusb)
maybe_add_component(arduino_tinyusb)
endif()
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
list(APPEND priv_requires esp_https_ota)
maybe_add_component(esp_https_ota)
endif()
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_LITTLEFS)
if(CONFIG_LITTLEFS_PAGE_SIZE)
list(APPEND priv_requires esp_littlefs)
endif()
endif()

idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})

if(IDF_TARGET STREQUAL "esp32")
target_compile_options(${COMPONENT_TARGET} PUBLIC -DARDUINO=10812 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="esp32" -DESP32)
endif()
if(IDF_TARGET STREQUAL "esp32s2")
target_compile_options(${COMPONENT_TARGET} PUBLIC -DARDUINO=10812 -DARDUINO_ESP32S2_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32S2_DEV" -DARDUINO_VARIANT="esp32s2" -DESP32)
maybe_add_component(esp_littlefs)
endif()
Loading