Skip to content

update 05022022 #72

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 8 commits into from
Feb 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/upload-idf-component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Push components to https://components.espressif.com
on:
push:
tags:
- v*
jobs:
upload_components:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"

- name: Upload components to the component registry
uses: espressif/github-actions/upload_components@master
with:
name: arduino-esp32
namespace: espressif
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
278 changes: 278 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5088,6 +5088,284 @@ adafruit_qtpy_esp32s2.menu.DebugLevel.debug.build.code_debug=4
adafruit_qtpy_esp32s2.menu.DebugLevel.verbose=Verbose
adafruit_qtpy_esp32s2.menu.DebugLevel.verbose.build.code_debug=5

##############################################################

adafruit_qtpy_esp32c3.name=Adafruit QT Py ESP32-C3
adafruit_qtpy_esp32c3.vid.0=0x303a
adafruit_qtpy_esp32c3.pid.0=0x1001

adafruit_qtpy_esp32c3.upload.tool=esptool_py
adafruit_qtpy_esp32c3.upload.maximum_size=1310720
adafruit_qtpy_esp32c3.upload.maximum_data_size=327680
adafruit_qtpy_esp32c3.upload.flags=
adafruit_qtpy_esp32c3.upload.extra_flags=
adafruit_qtpy_esp32c3.upload.use_1200bps_touch=false
adafruit_qtpy_esp32c3.upload.wait_for_upload_port=false

adafruit_qtpy_esp32c3.serial.disableDTR=false
adafruit_qtpy_esp32c3.serial.disableRTS=false

adafruit_qtpy_esp32c3.build.tarch=riscv32
adafruit_qtpy_esp32c3.build.target=esp
adafruit_qtpy_esp32c3.build.mcu=esp32c3
adafruit_qtpy_esp32c3.build.core=esp32
adafruit_qtpy_esp32c3.build.variant=adafruit_qtpy_esp32c3
adafruit_qtpy_esp32c3.build.board=ADAFRUIT_QTPY_ESP32C3
adafruit_qtpy_esp32c3.build.bootloader_addr=0x0

adafruit_qtpy_esp32c3.build.cdc_on_boot=0
adafruit_qtpy_esp32c3.build.f_cpu=160000000L
adafruit_qtpy_esp32c3.build.flash_size=4MB
adafruit_qtpy_esp32c3.build.flash_freq=80m
adafruit_qtpy_esp32c3.build.flash_mode=dout
adafruit_qtpy_esp32c3.build.boot=dout
adafruit_qtpy_esp32c3.build.partitions=default
adafruit_qtpy_esp32c3.build.defines=

adafruit_qtpy_esp32c3.menu.CDCOnBoot.cdc=Enabled
adafruit_qtpy_esp32c3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
adafruit_qtpy_esp32c3.menu.CDCOnBoot.default=Disabled
adafruit_qtpy_esp32c3.menu.CDCOnBoot.default.build.cdc_on_boot=0

adafruit_qtpy_esp32c3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.default.build.partitions=default
adafruit_qtpy_esp32c3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
adafruit_qtpy_esp32c3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.minimal.build.partitions=minimal
adafruit_qtpy_esp32c3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.no_ota.build.partitions=no_ota
adafruit_qtpy_esp32c3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
adafruit_qtpy_esp32c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.huge_app.build.partitions=huge_app
adafruit_qtpy_esp32c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
adafruit_qtpy_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
adafruit_qtpy_esp32c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_qtpy_esp32c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080

adafruit_qtpy_esp32c3.menu.CPUFreq.160=160MHz (WiFi)
adafruit_qtpy_esp32c3.menu.CPUFreq.160.build.f_cpu=160000000L
adafruit_qtpy_esp32c3.menu.CPUFreq.80=80MHz (WiFi)
adafruit_qtpy_esp32c3.menu.CPUFreq.80.build.f_cpu=80000000L
adafruit_qtpy_esp32c3.menu.CPUFreq.40=40MHz
adafruit_qtpy_esp32c3.menu.CPUFreq.40.build.f_cpu=40000000L
adafruit_qtpy_esp32c3.menu.CPUFreq.20=20MHz
adafruit_qtpy_esp32c3.menu.CPUFreq.20.build.f_cpu=20000000L
adafruit_qtpy_esp32c3.menu.CPUFreq.10=10MHz
adafruit_qtpy_esp32c3.menu.CPUFreq.10.build.f_cpu=10000000L

adafruit_qtpy_esp32c3.menu.FlashMode.dout=DOUT
adafruit_qtpy_esp32c3.menu.FlashMode.dout.build.flash_mode=dout
adafruit_qtpy_esp32c3.menu.FlashMode.dout.build.boot=dout
adafruit_qtpy_esp32c3.menu.FlashMode.qio=QIO
adafruit_qtpy_esp32c3.menu.FlashMode.qio.build.flash_mode=dio
adafruit_qtpy_esp32c3.menu.FlashMode.qio.build.boot=qio
adafruit_qtpy_esp32c3.menu.FlashMode.dio=DIO
adafruit_qtpy_esp32c3.menu.FlashMode.dio.build.flash_mode=dio
adafruit_qtpy_esp32c3.menu.FlashMode.dio.build.boot=dio
adafruit_qtpy_esp32c3.menu.FlashMode.qout=QOUT
adafruit_qtpy_esp32c3.menu.FlashMode.qout.build.flash_mode=dout
adafruit_qtpy_esp32c3.menu.FlashMode.qout.build.boot=qout

adafruit_qtpy_esp32c3.menu.FlashFreq.80=80MHz
adafruit_qtpy_esp32c3.menu.FlashFreq.80.build.flash_freq=80m
adafruit_qtpy_esp32c3.menu.FlashFreq.40=40MHz
adafruit_qtpy_esp32c3.menu.FlashFreq.40.build.flash_freq=40m

adafruit_qtpy_esp32c3.menu.FlashSize.4M=4MB (32Mb)
adafruit_qtpy_esp32c3.menu.FlashSize.4M.build.flash_size=4MB
adafruit_qtpy_esp32c3.menu.FlashSize.2M=2MB (16Mb)
adafruit_qtpy_esp32c3.menu.FlashSize.2M.build.flash_size=2MB
adafruit_qtpy_esp32c3.menu.FlashSize.2M.build.partitions=minimal

adafruit_qtpy_esp32c3.menu.UploadSpeed.115200=115200
adafruit_qtpy_esp32c3.menu.UploadSpeed.115200.upload.speed=115200
adafruit_qtpy_esp32c3.menu.UploadSpeed.921600=921600
adafruit_qtpy_esp32c3.menu.UploadSpeed.921600.upload.speed=921600
adafruit_qtpy_esp32c3.menu.UploadSpeed.921600=921600
adafruit_qtpy_esp32c3.menu.UploadSpeed.921600.upload.speed=921600
adafruit_qtpy_esp32c3.menu.UploadSpeed.115200=115200
adafruit_qtpy_esp32c3.menu.UploadSpeed.115200.upload.speed=115200
adafruit_qtpy_esp32c3.menu.UploadSpeed.256000.windows=256000
adafruit_qtpy_esp32c3.menu.UploadSpeed.256000.upload.speed=256000
adafruit_qtpy_esp32c3.menu.UploadSpeed.230400.windows.upload.speed=256000
adafruit_qtpy_esp32c3.menu.UploadSpeed.230400=230400
adafruit_qtpy_esp32c3.menu.UploadSpeed.230400.upload.speed=230400
adafruit_qtpy_esp32c3.menu.UploadSpeed.460800.linux=460800
adafruit_qtpy_esp32c3.menu.UploadSpeed.460800.macosx=460800
adafruit_qtpy_esp32c3.menu.UploadSpeed.460800.upload.speed=460800
adafruit_qtpy_esp32c3.menu.UploadSpeed.512000.windows=512000
adafruit_qtpy_esp32c3.menu.UploadSpeed.512000.upload.speed=512000

adafruit_qtpy_esp32c3.menu.DebugLevel.none=None
adafruit_qtpy_esp32c3.menu.DebugLevel.none.build.code_debug=0
adafruit_qtpy_esp32c3.menu.DebugLevel.error=Error
adafruit_qtpy_esp32c3.menu.DebugLevel.error.build.code_debug=1
adafruit_qtpy_esp32c3.menu.DebugLevel.warn=Warn
adafruit_qtpy_esp32c3.menu.DebugLevel.warn.build.code_debug=2
adafruit_qtpy_esp32c3.menu.DebugLevel.info=Info
adafruit_qtpy_esp32c3.menu.DebugLevel.info.build.code_debug=3
adafruit_qtpy_esp32c3.menu.DebugLevel.debug=Debug
adafruit_qtpy_esp32c3.menu.DebugLevel.debug.build.code_debug=4
adafruit_qtpy_esp32c3.menu.DebugLevel.verbose=Verbose
adafruit_qtpy_esp32c3.menu.DebugLevel.verbose.build.code_debug=5


adafruit_qtpy_esp32_pico.name=Adafruit QT Py ESP32 Pico

adafruit_qtpy_esp32_pico.upload.tool=esptool_py
adafruit_qtpy_esp32_pico.upload.maximum_size=1310720
adafruit_qtpy_esp32_pico.upload.maximum_data_size=327680
adafruit_qtpy_esp32_pico.upload.flags=
adafruit_qtpy_esp32_pico.upload.extra_flags=

adafruit_qtpy_esp32_pico.serial.disableDTR=true
adafruit_qtpy_esp32_pico.serial.disableRTS=true

adafruit_qtpy_esp32_pico.build.tarch=xtensa
adafruit_qtpy_esp32_pico.build.bootloader_addr=0x1000
adafruit_qtpy_esp32_pico.build.target=esp32
adafruit_qtpy_esp32_pico.build.mcu=esp32
adafruit_qtpy_esp32_pico.build.core=esp32
adafruit_qtpy_esp32_pico.build.variant=adafruit_qtpy_esp32
adafruit_qtpy_esp32_pico.build.board=ADAFRUIT_QTPY_ESP32_PICO

adafruit_qtpy_esp32_pico.build.f_cpu=240000000L
adafruit_qtpy_esp32_pico.build.flash_size=8MB
adafruit_qtpy_esp32_pico.build.flash_freq=80m
adafruit_qtpy_esp32_pico.build.flash_mode=dio
adafruit_qtpy_esp32_pico.build.boot=dio
adafruit_qtpy_esp32_pico.build.partitions=default
adafruit_qtpy_esp32_pico.build.defines=

adafruit_qtpy_esp32_pico.menu.PartitionScheme.default=Default
adafruit_qtpy_esp32_pico.menu.PartitionScheme.default.build.partitions=default
adafruit_qtpy_esp32_pico.menu.PartitionScheme.no_ota=No OTA (Large APP)
adafruit_qtpy_esp32_pico.menu.PartitionScheme.no_ota.build.partitions=no_ota
adafruit_qtpy_esp32_pico.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
adafruit_qtpy_esp32_pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
adafruit_qtpy_esp32_pico.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_qtpy_esp32_pico.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080

adafruit_qtpy_esp32_pico.menu.UploadSpeed.921600=921600
adafruit_qtpy_esp32_pico.menu.UploadSpeed.921600.upload.speed=921600
adafruit_qtpy_esp32_pico.menu.UploadSpeed.115200=115200
adafruit_qtpy_esp32_pico.menu.UploadSpeed.115200.upload.speed=115200
adafruit_qtpy_esp32_pico.menu.UploadSpeed.256000.windows=256000
adafruit_qtpy_esp32_pico.menu.UploadSpeed.256000.upload.speed=256000
adafruit_qtpy_esp32_pico.menu.UploadSpeed.230400.windows.upload.speed=256000
adafruit_qtpy_esp32_pico.menu.UploadSpeed.230400=230400
adafruit_qtpy_esp32_pico.menu.UploadSpeed.230400.upload.speed=230400
adafruit_qtpy_esp32_pico.menu.UploadSpeed.460800.linux=460800
adafruit_qtpy_esp32_pico.menu.UploadSpeed.460800.macosx=460800
adafruit_qtpy_esp32_pico.menu.UploadSpeed.460800.upload.speed=460800
adafruit_qtpy_esp32_pico.menu.UploadSpeed.512000.windows=512000
adafruit_qtpy_esp32_pico.menu.UploadSpeed.512000.upload.speed=512000

adafruit_qtpy_esp32_pico.menu.PSRAM.enabled=Enabled
adafruit_qtpy_esp32_pico.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
adafruit_qtpy_esp32_pico.menu.PSRAM.enabled.build.extra_libs=
adafruit_qtpy_esp32_pico.menu.PSRAM.disabled=Disabled
adafruit_qtpy_esp32_pico.menu.PSRAM.disabled.build.defines=
adafruit_qtpy_esp32_pico.menu.PSRAM.disabled.build.extra_libs=

adafruit_qtpy_esp32_pico.menu.DebugLevel.none=None
adafruit_qtpy_esp32_pico.menu.DebugLevel.none.build.code_debug=0
adafruit_qtpy_esp32_pico.menu.DebugLevel.error=Error
adafruit_qtpy_esp32_pico.menu.DebugLevel.error.build.code_debug=1
adafruit_qtpy_esp32_pico.menu.DebugLevel.warn=Warn
adafruit_qtpy_esp32_pico.menu.DebugLevel.warn.build.code_debug=2
adafruit_qtpy_esp32_pico.menu.DebugLevel.info=Info
adafruit_qtpy_esp32_pico.menu.DebugLevel.info.build.code_debug=3
adafruit_qtpy_esp32_pico.menu.DebugLevel.debug=Debug
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.build.code_debug=5



adafruit_feather_esp32_v2.name=Adafruit Feather ESP32 V2

adafruit_feather_esp32_v2.upload.tool=esptool_py
adafruit_feather_esp32_v2.upload.maximum_size=1310720
adafruit_feather_esp32_v2.upload.maximum_data_size=327680
adafruit_feather_esp32_v2.upload.flags=
adafruit_feather_esp32_v2.upload.extra_flags=

adafruit_feather_esp32_v2.serial.disableDTR=true
adafruit_feather_esp32_v2.serial.disableRTS=true

adafruit_feather_esp32_v2.build.tarch=xtensa
adafruit_feather_esp32_v2.build.bootloader_addr=0x1000
adafruit_feather_esp32_v2.build.target=esp32
adafruit_feather_esp32_v2.build.mcu=esp32
adafruit_feather_esp32_v2.build.core=esp32
adafruit_feather_esp32_v2.build.variant=adafruit_feather_esp32_v2
adafruit_feather_esp32_v2.build.board=ADAFRUIT_FEATHER_ESP32_V2

adafruit_feather_esp32_v2.build.f_cpu=240000000L
adafruit_feather_esp32_v2.build.flash_size=8MB
adafruit_feather_esp32_v2.build.flash_freq=80m
adafruit_feather_esp32_v2.build.flash_mode=dio
adafruit_feather_esp32_v2.build.boot=dio
adafruit_feather_esp32_v2.build.partitions=default
adafruit_feather_esp32_v2.build.defines=

adafruit_feather_esp32_v2.menu.PartitionScheme.default=Default
adafruit_feather_esp32_v2.menu.PartitionScheme.default.build.partitions=default
adafruit_feather_esp32_v2.menu.PartitionScheme.no_ota=No OTA (Large APP)
adafruit_feather_esp32_v2.menu.PartitionScheme.no_ota.build.partitions=no_ota
adafruit_feather_esp32_v2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
adafruit_feather_esp32_v2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
adafruit_feather_esp32_v2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
adafruit_feather_esp32_v2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080

adafruit_feather_esp32_v2.menu.UploadSpeed.921600=921600
adafruit_feather_esp32_v2.menu.UploadSpeed.921600.upload.speed=921600
adafruit_feather_esp32_v2.menu.UploadSpeed.115200=115200
adafruit_feather_esp32_v2.menu.UploadSpeed.115200.upload.speed=115200
adafruit_feather_esp32_v2.menu.UploadSpeed.256000.windows=256000
adafruit_feather_esp32_v2.menu.UploadSpeed.256000.upload.speed=256000
adafruit_feather_esp32_v2.menu.UploadSpeed.230400.windows.upload.speed=256000
adafruit_feather_esp32_v2.menu.UploadSpeed.230400=230400
adafruit_feather_esp32_v2.menu.UploadSpeed.230400.upload.speed=230400
adafruit_feather_esp32_v2.menu.UploadSpeed.460800.linux=460800
adafruit_feather_esp32_v2.menu.UploadSpeed.460800.macosx=460800
adafruit_feather_esp32_v2.menu.UploadSpeed.460800.upload.speed=460800
adafruit_feather_esp32_v2.menu.UploadSpeed.512000.windows=512000
adafruit_feather_esp32_v2.menu.UploadSpeed.512000.upload.speed=512000

adafruit_feather_esp32_v2.menu.PSRAM.enabled=Enabled
adafruit_feather_esp32_v2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
adafruit_feather_esp32_v2.menu.PSRAM.enabled.build.extra_libs=
adafruit_feather_esp32_v2.menu.PSRAM.disabled=Disabled
adafruit_feather_esp32_v2.menu.PSRAM.disabled.build.defines=
adafruit_feather_esp32_v2.menu.PSRAM.disabled.build.extra_libs=

adafruit_feather_esp32_v2.menu.DebugLevel.none=None
adafruit_feather_esp32_v2.menu.DebugLevel.none.build.code_debug=0
adafruit_feather_esp32_v2.menu.DebugLevel.error=Error
adafruit_feather_esp32_v2.menu.DebugLevel.error.build.code_debug=1
adafruit_feather_esp32_v2.menu.DebugLevel.warn=Warn
adafruit_feather_esp32_v2.menu.DebugLevel.warn.build.code_debug=2
adafruit_feather_esp32_v2.menu.DebugLevel.info=Info
adafruit_feather_esp32_v2.menu.DebugLevel.info.build.code_debug=3
adafruit_feather_esp32_v2.menu.DebugLevel.debug=Debug
adafruit_feather_esp32_v2.menu.DebugLevel.debug.build.code_debug=4
adafruit_feather_esp32_v2.menu.DebugLevel.verbose=Verbose
adafruit_feather_esp32_v2.menu.DebugLevel.verbose.build.code_debug=5



##############################################################

nodemcu-32s.name=NodeMCU-32S
Expand Down
3 changes: 2 additions & 1 deletion cores/esp32/WString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,10 @@ void String::replace(const String& find, const String& replace) {
}
if(size == len())
return;
if(size > capacity() && !changeBuffer(size))
if(size > capacity() && !changeBuffer(size)) {
log_w("String.Replace() Insufficient space to replace string");
return;
}
int index = len() - 1;
while(index >= 0 && (index = lastIndexOf(find, index)) >= 0) {
readFrom = wbuffer() + index + find.len();
Expand Down
26 changes: 26 additions & 0 deletions cores/esp32/esp32-hal-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,32 @@
#include "esp_intr.h"
#endif

#include "soc/soc_caps.h"
// It fixes lack of pin definition for S3 and for any future SoC
// this function works for ESP32, ESP32-S2 and ESP32-S3 - including the C3, it will return -1 for any pin
#if SOC_TOUCH_SENSOR_NUM > 0
#include "soc/touch_sensor_periph.h"
int8_t digitalPinToTouchChannel(uint8_t pin)
{
int8_t ret = -1;
if (pin < SOC_GPIO_PIN_COUNT) {
for (uint8_t i = 0; i < SOC_TOUCH_SENSOR_NUM; i++) {
if (touch_sensor_channel_io_map[i] == pin) {
ret = i;
break;
}
}
}
return ret;
}
#else
// No Touch Sensor available
int8_t digitalPinToTouchChannel(uint8_t pin)
{
return -1;
}
#endif

#if CONFIG_IDF_TARGET_ESP32
const int8_t esp32_adc2gpio[20] = {36, 37, 38, 39, 32, 33, 34, 35, -1, -1, 4, 0, 2, 15, 13, 12, 14, 27, 25, 26};
#elif CONFIG_IDF_TARGET_ESP32S2
Expand Down
3 changes: 2 additions & 1 deletion cores/esp32/esp32-hal-gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ extern const int8_t esp32_adc2gpio[20];
#define digitalPinCanOutput(pin) ((pin) < NUM_OUPUT_PINS && esp32_gpioMux[(pin)].reg)
#define digitalPinToRtcPin(pin) (((pin) < SOC_GPIO_PIN_COUNT)?esp32_gpioMux[(pin)].rtc:-1)
#define digitalPinToAnalogChannel(pin) (((pin) < SOC_GPIO_PIN_COUNT)?esp32_gpioMux[(pin)].adc:-1)
#define digitalPinToTouchChannel(pin) (((pin) < SOC_GPIO_PIN_COUNT)?esp32_gpioMux[(pin)].touch:-1)
#define digitalPinToDacChannel(pin) (((pin) == PIN_DAC1)?0:((pin) == PIN_DAC2)?1:-1)

void pinMode(uint8_t pin, uint8_t mode);
Expand All @@ -93,6 +92,8 @@ void attachInterrupt(uint8_t pin, void (*)(void), int mode);
void attachInterruptArg(uint8_t pin, void (*)(void*), void * arg, int mode);
void detachInterrupt(uint8_t pin);

int8_t digitalPinToTouchChannel(uint8_t pin);

#ifdef __cplusplus
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions cores/esp32/esp32-hal-ledc.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ void ledcAttachPin(uint8_t pin, uint8_t chan)
};
ledc_channel_config(&ledc_channel);

//Making attachInterrupt to work.
//WILL BE REMOVED AFTER REFACTORING GPIO to use ESP-IDF API
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
pinMode(pin,OUTPUT);
#endif
}

void ledcDetachPin(uint8_t pin)
Expand Down
Loading