Skip to content

Commit 21c683e

Browse files
committed
Merge branch 'uart-pins' of https://github.com/suglider/arduino-esp32 into uart-pins
2 parents a7d2bf0 + 195a023 commit 21c683e

File tree

147 files changed

+440
-531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+440
-531
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ set(includedirs
174174
libraries/EEPROM/src
175175
libraries/ESP32/src
176176
libraries/ESPmDNS/src
177+
libraries/Ethernet/src
177178
libraries/FFat/src
178179
libraries/FS/src
179180
libraries/HTTPClient/src

cores/esp32/esp32-hal-adc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "soc/rtc_io_reg.h"
2828
#include "esp32/rom/ets_sys.h"
2929
#include "esp_intr_alloc.h"
30+
#include "soc/dac_channel.h"
3031
#define DEFAULT_VREF 1100
3132
static esp_adc_cal_characteristics_t *__analogCharacteristics[2] = {NULL, NULL};
3233
static uint16_t __analogVRef = 0;
@@ -35,6 +36,7 @@ static uint8_t __analogVRefPin = 0;
3536
#include "esp32s2/rom/ets_sys.h"
3637
#include "soc/sens_reg.h"
3738
#include "soc/rtc_io_reg.h"
39+
#include "soc/dac_channel.h"
3840
#elif CONFIG_IDF_TARGET_ESP32C3
3941
#include "esp32c3/rom/ets_sys.h"
4042
#else
@@ -141,10 +143,10 @@ bool __adcAttachPin(uint8_t pin){
141143
}
142144
#endif
143145
}
144-
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
145-
else if(pin == 25){
146+
#if SOC_DAC_SUPPORTED
147+
else if(pin == DAC_CHANNEL_1_GPIO_NUM){
146148
CLEAR_PERI_REG_MASK(RTC_IO_PAD_DAC1_REG, RTC_IO_PDAC1_XPD_DAC | RTC_IO_PDAC1_DAC_XPD_FORCE);//stop dac1
147-
} else if(pin == 26){
149+
} else if(pin == DAC_CHANNEL_2_GPIO_NUM){
148150
CLEAR_PERI_REG_MASK(RTC_IO_PAD_DAC2_REG, RTC_IO_PDAC2_XPD_DAC | RTC_IO_PDAC2_DAC_XPD_FORCE);//stop dac2
149151
}
150152
#endif

0 commit comments

Comments
 (0)