summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucian Copeland <hierophect@gmail.com>2020-10-01 17:14:12 -0400
committerLucian Copeland <hierophect@gmail.com>2020-10-01 17:17:39 -0400
commita8dfae58d99665332fa1ecd4e689270b69a313d3 (patch)
tree29450692582a2470b6be0521f491e89867fe69af
parent0bbd067a17eaf89ec5fdc87d18555edb4608f784 (diff)
parent9a3bd82f40784c53f39d3fb806476c6fd2083da6 (diff)
Add ADC calibration module support
m---------lib/tinyusb0
-rw-r--r--locale/circuitpython.pot2
-rw-r--r--ports/esp32s2/CMakeLists.txt2
-rw-r--r--ports/esp32s2/Makefile10
-rw-r--r--ports/esp32s2/common-hal/analogio/AnalogIn.c1
-rw-r--r--ports/esp32s2/mpconfigport.h7
6 files changed, 12 insertions, 10 deletions
diff --git a/lib/tinyusb b/lib/tinyusb
-Subproject e90cf7a676eddcbd9c35d2d99a0a9cd14686e2c
+Subproject 8b2c82255750488232eae72f3d5dcbacfd6227f
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index 2d994b01d..d0bbe6707 100644
--- a/locale/circuitpython.pot
+++ b/locale/circuitpython.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-09-25 18:14-0400\n"
+"POT-Creation-Date: 2020-10-01 17:17-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/ports/esp32s2/CMakeLists.txt b/ports/esp32s2/CMakeLists.txt
index 0d7f48995..6ad33282f 100644
--- a/ports/esp32s2/CMakeLists.txt
+++ b/ports/esp32s2/CMakeLists.txt
@@ -6,7 +6,7 @@ set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf)
# The component list here determines what options we get in menuconfig and what the ninja file
# can build.
-set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls esp_event esp_netif esp_wifi lwip wpa_supplicant freertos)
+set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls esp_event esp_adc_cal esp_netif esp_wifi lwip wpa_supplicant freertos)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(circuitpython)
diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile
index f19c960f4..3488780f6 100644
--- a/ports/esp32s2/Makefile
+++ b/ports/esp32s2/Makefile
@@ -76,10 +76,6 @@ INC += -I../../supervisor/shared/usb
INC += -isystem esp-idf
INC += -isystem esp-idf/components/driver/include
-INC += -isystem esp-idf/components/hal/esp32s2/include
-INC += -isystem esp-idf/components/driver/esp32s2/include
-INC += -isystem esp-idf/components/hal/include
-
INC += -isystem esp-idf/components/freertos/include/freertos
INC += -isystem esp-idf/components/freertos/xtensa/include
INC += -isystem esp-idf/components/esp32s2/include
@@ -98,6 +94,10 @@ INC += -isystem esp-idf/components/newlib/platform_include
INC += -isystem esp-idf/components/lwip/lwip/src/include
INC += -isystem esp-idf/components/lwip/port/esp32/include
INC += -isystem esp-idf/components/lwip/include/apps/sntp
+INC += -isystem esp-idf/components/hal/include
+INC += -isystem esp-idf/components/hal/esp32s2/include
+INC += -isystem esp-idf/components/log/include/
+INC += -isystem esp-idf/components/driver/esp32s2/include
INC += -isystem esp-idf/components/soc/include
INC += -isystem esp-idf/components/soc/src/esp32s2/include
INC += -isystem esp-idf/components/soc/soc/include
@@ -263,7 +263,7 @@ menuconfig: $(BUILD)/esp-idf/config
$(HEADER_BUILD)/qstr.i.last: | $(BUILD)/esp-idf/config/sdkconfig.h
# Order here matters
-ESP_IDF_COMPONENTS_LINK = freertos log esp_system esp32s2 bootloader_support pthread esp_timer vfs spi_flash app_update esp_common esp32s2 heap newlib driver xtensa soc esp_ringbuf esp_wifi esp_event wpa_supplicant mbedtls efuse nvs_flash esp_netif lwip esp_rom esp-tls
+ESP_IDF_COMPONENTS_LINK = freertos log esp_system esp_adc_cal esp32s2 bootloader_support pthread esp_timer vfs spi_flash app_update esp_common esp32s2 heap newlib driver xtensa soc esp_ringbuf esp_wifi esp_event wpa_supplicant mbedtls efuse nvs_flash esp_netif lwip esp_rom esp-tls
ESP_IDF_COMPONENTS_INCLUDE = driver freertos log soc
diff --git a/ports/esp32s2/common-hal/analogio/AnalogIn.c b/ports/esp32s2/common-hal/analogio/AnalogIn.c
index d8acc5728..bab1721ea 100644
--- a/ports/esp32s2/common-hal/analogio/AnalogIn.c
+++ b/ports/esp32s2/common-hal/analogio/AnalogIn.c
@@ -30,7 +30,6 @@
#include "supervisor/shared/translate.h"
#include "components/driver/include/driver/adc_common.h"
-
#include "components/esp_adc_cal/include/esp_adc_cal.h"
#include "shared-bindings/microcontroller/Pin.h"
diff --git a/ports/esp32s2/mpconfigport.h b/ports/esp32s2/mpconfigport.h
index c06e63439..066d0fd2c 100644
--- a/ports/esp32s2/mpconfigport.h
+++ b/ports/esp32s2/mpconfigport.h
@@ -31,11 +31,14 @@
#define CIRCUITPY_INTERNAL_NVM_SIZE (0)
#define MICROPY_NLR_THUMB (0)
-#define MICROPY_PY_UJSON (1)
-#define MICROPY_USE_INTERNAL_PRINTF (0)
+#define MICROPY_PY_UJSON (1)
+#define MICROPY_USE_INTERNAL_PRINTF (0)
#include "py/circuitpy_mpconfig.h"
+// ESP-IDF leaves this undefined but uses it everywhere.
+// Defining it will reduce chance of undef errors.
+#define CONFIG_IDF_TARGET_ESP32 (0)
#define MICROPY_PORT_ROOT_POINTERS \
CIRCUITPY_COMMON_ROOT_POINTERS