Merge pull request #5367 from microDev1/refactor-esp-port
Update espressif port
This commit is contained in:
commit
48866dd3e7
@ -59,59 +59,61 @@ include $(TOP)/supervisor/supervisor.mk
|
||||
# Include make rules and variables common across CircuitPython builds.
|
||||
include $(TOP)/py/circuitpy_defns.mk
|
||||
|
||||
CROSS_COMPILE = xtensa-esp32s2-elf-
|
||||
CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf-
|
||||
|
||||
#######################################
|
||||
# CFLAGS
|
||||
#######################################
|
||||
|
||||
INC += -I.
|
||||
INC += -I./boards
|
||||
INC += -I./boards/$(BOARD)
|
||||
INC += -I./peripherals
|
||||
INC += -I../..
|
||||
INC += -I../../lib/mp-readline
|
||||
INC += -I../../lib/tinyusb/src
|
||||
INC += -I../../supervisor/shared/usb
|
||||
INC += -I$(BUILD)
|
||||
INC += -I$(BUILD)/genhdr
|
||||
INC += -I$(BUILD)/esp-idf/config
|
||||
|
||||
INC += -isystem esp-idf
|
||||
INC += -isystem esp-idf/components/app_update/include
|
||||
INC += -isystem esp-idf/components/bootloader_support/include
|
||||
INC += -isystem esp-idf/components/driver/esp32s2/include
|
||||
INC += -isystem esp-idf/components/driver/include
|
||||
INC += -isystem esp-idf/components/esp32s2/include
|
||||
INC += -isystem esp-idf/components/esp_common/include
|
||||
INC += -isystem esp-idf/components/esp_event/include
|
||||
INC += -isystem esp-idf/components/esp_hw_support/include
|
||||
INC += -isystem esp-idf/components/esp_netif/include
|
||||
INC += -isystem esp-idf/components/esp_pm/include
|
||||
INC += -isystem esp-idf/components/esp_ringbuf/include
|
||||
INC += -isystem esp-idf/components/esp_rom/include
|
||||
INC += -isystem esp-idf/components/esp_system/include
|
||||
INC += -isystem esp-idf/components/esp_timer/include
|
||||
INC += -isystem esp-idf/components/esp_wifi/include
|
||||
INC += -isystem esp-idf/components/freertos/include
|
||||
INC += -isystem esp-idf/components/freertos/include/freertos
|
||||
INC += -isystem esp-idf/components/freertos/port/xtensa/include
|
||||
INC += -isystem esp-idf/components/hal/include
|
||||
INC += -isystem esp-idf/components/hal/esp32s2/include
|
||||
INC += -isystem esp-idf/components/heap/include
|
||||
INC += -isystem esp-idf/components/log/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/mbedtls/mbedtls/include
|
||||
INC += -isystem esp-idf/components/mbedtls/port/include/
|
||||
INC += -isystem esp-idf/components/newlib/platform_include
|
||||
INC += -isystem esp-idf/components/nvs_flash/include
|
||||
INC += -isystem esp-idf/components/soc/include
|
||||
INC += -isystem esp-idf/components/soc/esp32s2/include
|
||||
INC += -isystem esp-idf/components/spi_flash/include
|
||||
INC += -isystem esp-idf/components/xtensa/esp32s2/include
|
||||
INC += -isystem esp-idf/components/xtensa/include
|
||||
INC += -I.\
|
||||
-I./boards \
|
||||
-I./boards/$(BOARD) \
|
||||
-I./peripherals \
|
||||
-I../.. \
|
||||
-I../../lib/mp-readline \
|
||||
-I../../lib/tinyusb/src \
|
||||
-I../../supervisor/shared/usb \
|
||||
-I$(BUILD) \
|
||||
-I$(BUILD)/genhdr \
|
||||
-I$(BUILD)/esp-idf/config \
|
||||
-isystem esp-idf \
|
||||
-isystem esp-idf/components/app_update/include \
|
||||
-isystem esp-idf/components/bootloader_support/include \
|
||||
-isystem esp-idf/components/driver/include \
|
||||
-isystem esp-idf/components/driver/$(IDF_TARGET)/include \
|
||||
-isystem esp-idf/components/$(IDF_TARGET)/include \
|
||||
-isystem esp-idf/components/esp_adc_cal/include \
|
||||
-isystem esp-idf/components/esp_common/include \
|
||||
-isystem esp-idf/components/esp_event/include \
|
||||
-isystem esp-idf/components/esp_hw_support/include \
|
||||
-isystem esp-idf/components/esp_netif/include \
|
||||
-isystem esp-idf/components/esp_pm/include \
|
||||
-isystem esp-idf/components/esp_ringbuf/include \
|
||||
-isystem esp-idf/components/esp_rom/include \
|
||||
-isystem esp-idf/components/esp_system/include \
|
||||
-isystem esp-idf/components/esp_timer/include \
|
||||
-isystem esp-idf/components/esp_wifi/include \
|
||||
-isystem esp-idf/components/freertos/include \
|
||||
-isystem esp-idf/components/freertos/include/freertos \
|
||||
-isystem esp-idf/components/freertos/port/xtensa/include \
|
||||
-isystem esp-idf/components/hal/include \
|
||||
-isystem esp-idf/components/hal/$(IDF_TARGET)/include \
|
||||
-isystem esp-idf/components/hal/platform_port/include \
|
||||
-isystem esp-idf/components/heap/include \
|
||||
-isystem esp-idf/components/log/include \
|
||||
-isystem esp-idf/components/lwip/include \
|
||||
-isystem esp-idf/components/lwip/lwip/src/include \
|
||||
-isystem esp-idf/components/lwip/port/esp32/include \
|
||||
-isystem esp-idf/components/mbedtls/esp_crt_bundle/include \
|
||||
-isystem esp-idf/components/mbedtls/mbedtls/include \
|
||||
-isystem esp-idf/components/mbedtls/port/include \
|
||||
-isystem esp-idf/components/newlib/platform_include \
|
||||
-isystem esp-idf/components/nvs_flash/include \
|
||||
-isystem esp-idf/components/soc/include \
|
||||
-isystem esp-idf/components/soc/$(IDF_TARGET)/include \
|
||||
-isystem esp-idf/components/spi_flash/include \
|
||||
-isystem esp-idf/components/xtensa/include \
|
||||
-isystem esp-idf/components/xtensa/$(IDF_TARGET)/include
|
||||
|
||||
CFLAGS += -DHAVE_CONFIG_H \
|
||||
-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" \
|
||||
@ -141,19 +143,19 @@ CFLAGS += $(INC) -Werror -Wall -mlongcalls -std=gnu11 -Wl,--gc-sections $(BASE_C
|
||||
|
||||
LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority
|
||||
|
||||
LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp32s2 \
|
||||
-L$(BUILD)/esp-idf/esp-idf/esp32s2/ld \
|
||||
-Lesp-idf/components/esp32s2/ld \
|
||||
-Lesp-idf/components/esp_rom/esp32s2/ld \
|
||||
-Tesp32s2_out.ld \
|
||||
-Tesp32s2.project.ld \
|
||||
-Tesp32s2.peripherals.ld \
|
||||
-Tesp32s2.rom.ld \
|
||||
-Tesp32s2.rom.api.ld \
|
||||
-Tesp32s2.rom.libgcc.ld \
|
||||
-Tesp32s2.rom.newlib-data.ld \
|
||||
-Tesp32s2.rom.newlib-funcs.ld \
|
||||
-Tesp32s2.rom.spiflash.ld
|
||||
LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET) \
|
||||
-L$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld \
|
||||
-Lesp-idf/components/$(IDF_TARGET)/ld \
|
||||
-Lesp-idf/components/esp_rom/$(IDF_TARGET)/ld \
|
||||
-T$(IDF_TARGET)_out.ld \
|
||||
-T$(IDF_TARGET).project.ld \
|
||||
-T$(IDF_TARGET).peripherals.ld \
|
||||
-T$(IDF_TARGET).rom.ld \
|
||||
-T$(IDF_TARGET).rom.api.ld \
|
||||
-T$(IDF_TARGET).rom.libgcc.ld \
|
||||
-T$(IDF_TARGET).rom.newlib-data.ld \
|
||||
-T$(IDF_TARGET).rom.newlib-funcs.ld \
|
||||
-T$(IDF_TARGET).rom.spiflash.ld
|
||||
|
||||
LDFLAGS += -Wl,-Bstatic \
|
||||
-Wl,--no-warn-mismatch \
|
||||
@ -188,11 +190,11 @@ SRC_C += \
|
||||
boards/$(BOARD)/pins.c \
|
||||
modules/$(CIRCUITPY_MODULE).c \
|
||||
lib/netutils/netutils.c \
|
||||
peripherals/pcnt.c \
|
||||
peripherals/rmt.c \
|
||||
peripherals/timer.c \
|
||||
peripherals/touch.c \
|
||||
peripherals/pcnt.c \
|
||||
peripherals/pins.c \
|
||||
peripherals/rmt.c
|
||||
peripherals/$(IDF_TARGET)/pins.c
|
||||
|
||||
ifneq ($(CIRCUITPY_USB),0)
|
||||
SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c
|
||||
@ -246,23 +248,22 @@ ifeq ($(DEBUG), 1)
|
||||
else
|
||||
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults
|
||||
endif
|
||||
SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);boards/$(BOARD)/sdkconfig
|
||||
SDKCONFIGS = esp-idf-config/$(IDF_TARGET)/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);boards/$(BOARD)/sdkconfig
|
||||
|
||||
# create the config headers
|
||||
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig | $(BUILD)/esp-idf
|
||||
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja
|
||||
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja
|
||||
|
||||
# build a lib
|
||||
# Adding -d explain -j 1 -v to the ninja line will output debug info
|
||||
#$(BUILD)/esp-idf/esp-idf/%.a: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
# ninja -C $(BUILD)/esp-idf esp-idf/$*.a
|
||||
|
||||
$(BUILD)/esp-idf/esp-idf/esp32s2/esp32s2_out.ld: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
ninja -C $(BUILD)/esp-idf esp-idf/esp32s2/esp32s2_out.ld
|
||||
|
||||
$(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
ninja -C $(BUILD)/esp-idf esp-idf/esp32s2/ld/esp32s2.project.ld
|
||||
$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
ninja -C $(BUILD)/esp-idf esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld
|
||||
|
||||
$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
ninja -C $(BUILD)/esp-idf esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld
|
||||
|
||||
$(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
IDF_PATH=$(IDF_PATH) ninja -C $(BUILD)/esp-idf partition_table/partition-table.bin
|
||||
@ -276,7 +277,7 @@ menuconfig: $(BUILD)/esp-idf/config
|
||||
# qstr builds include headers so we need to make sure they are up to date
|
||||
$(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
|
||||
ESP_IDF_COMPONENTS_LINK = app_update bootloader_support driver efuse esp32s2 esp_adc_cal esp_common esp_event esp_hw_support esp_netif esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant xtensa
|
||||
ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_netif esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant xtensa
|
||||
|
||||
ESP_IDF_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a)
|
||||
ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a)
|
||||
@ -284,12 +285,12 @@ ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENT
|
||||
MBEDTLS_COMPONENTS_LINK = crypto tls x509
|
||||
MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a)
|
||||
|
||||
BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libxt_hal.a
|
||||
BINARY_BLOBS = esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a
|
||||
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a librtc.a libsmartconfig.a libphy.a
|
||||
BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/esp32s2/, $(BINARY_WIFI_BLOBS))
|
||||
BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS))
|
||||
|
||||
ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/esp32s2/libxt_hal.a
|
||||
ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/esp32s2/esp32s2_out.ld $(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld
|
||||
ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a
|
||||
ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld
|
||||
|
||||
FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE)
|
||||
|
||||
@ -305,8 +306,8 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
esp-idf/bootloader_support/libbootloader_support.a \
|
||||
esp-idf/driver/libdriver.a \
|
||||
esp-idf/efuse/libefuse.a \
|
||||
esp-idf/esp32s2/libesp32s2.a \
|
||||
esp-idf/esp32s2/ld/esp32s2.project.ld \
|
||||
esp-idf/$(IDF_TARGET)/lib$(IDF_TARGET).a \
|
||||
esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld \
|
||||
esp-idf/esp_adc_cal/libesp_adc_cal.a \
|
||||
esp-idf/esp_common/libesp_common.a \
|
||||
esp-idf/esp_event/libesp_event.a \
|
||||
@ -340,7 +341,7 @@ $(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp
|
||||
|
||||
$(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf | tools/build_memory_info.py
|
||||
$(STEPECHO) "Create $@"
|
||||
$(Q)esptool.py --chip esp32s2 elf2image $(FLASH_FLAGS) --elf-sha256-offset 0xb0 -o $@ $^
|
||||
$(Q)esptool.py --chip $(IDF_TARGET) elf2image $(FLASH_FLAGS) --elf-sha256-offset 0xb0 -o $@ $^
|
||||
$(Q)$(PYTHON3) tools/build_memory_info.py $< $(BUILD)/esp-idf/sdkconfig $@
|
||||
|
||||
$(BUILD)/firmware.bin: $(BUILD)/circuitpython-firmware.bin | esp-idf-stamp
|
||||
@ -351,10 +352,10 @@ $(BUILD)/firmware.uf2: $(BUILD)/circuitpython-firmware.bin
|
||||
$(Q)$(PYTHON3) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xbfdd4eee -b 0x0000 -c -o $@ $^
|
||||
|
||||
flash: $(BUILD)/firmware.bin
|
||||
esptool.py --chip esp32s2 -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x0000 $^
|
||||
esptool.py --chip $(IDF_TARGET) -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x0000 $^
|
||||
|
||||
flash-circuitpython-only: $(BUILD)/circuitpython-firmware.bin
|
||||
esptool.py --chip esp32s2 -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x10000 $^
|
||||
esptool.py --chip $(IDF_TARGET) -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x10000 $^
|
||||
|
||||
monitor: $(BUILD)/firmware.elf
|
||||
cp $< build/circuitpython.elf
|
||||
|
@ -24,9 +24,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_BACKGROUND_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_BACKGROUND_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_BACKGROUND_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_BACKGROUND_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_BACKGROUND_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_BACKGROUND_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_BINDINGS_ESPIDF___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_BINDINGS_ESPIDF___INIT___H
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "py/mpconfig.h"
|
||||
@ -39,4 +39,4 @@ NORETURN void mp_raise_espidf_MemoryError(void);
|
||||
void raise_esp_error(esp_err_t err) NORETURN;
|
||||
#define CHECK_ESP_RESULT(x) do { int res = (x); if (res != ESP_OK) raise_esp_error(res); } while (0)
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_BINDINGS_ESPIDF___INIT___H
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80EC
|
||||
USB_PRODUCT = "Feather ESP32S2 no PSRAM"
|
||||
USB_MANUFACTURER = "Adafruit"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80EE
|
||||
USB_PRODUCT = "Feather ESP32S2 TFT no PSRAM"
|
||||
USB_MANUFACTURER = "Adafruit"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80FA
|
||||
USB_PRODUCT = "FunHouse"
|
||||
USB_MANUFACTURER = "Adafruit"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80E6
|
||||
USB_PRODUCT = "MagTag"
|
||||
USB_MANUFACTURER = "Adafruit"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80E0
|
||||
USB_PRODUCT = "Metro ESP32S2"
|
||||
USB_MANUFACTURER = "Adafruit"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80A7
|
||||
USB_PRODUCT = "ESP 12k NodeMCU"
|
||||
USB_MANUFACTURER = "Ai-Thinker"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80AF
|
||||
USB_PRODUCT = "Reference Design RD00"
|
||||
USB_MANUFACTURER = "Artisense"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x8009
|
||||
USB_PRODUCT = "ATMegaZero ESP32-S2"
|
||||
USB_MANUFACTURER = "ATMegaZero"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x3141
|
||||
USB_PRODUCT = "CrumpS2"
|
||||
USB_MANUFACTURER = "CrumpSpace"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0xBAB0
|
||||
USB_PRODUCT = "Bast WiFi"
|
||||
USB_MANUFACTURER = "ElectronicCats"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x7001
|
||||
USB_PRODUCT = "ESP32-S2-HMI-DevKit-1"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80C8
|
||||
USB_PRODUCT = "Kaluga 1"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80C8
|
||||
USB_PRODUCT = "Kaluga 1"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80A8
|
||||
USB_PRODUCT = "Saola 1 w/WROOM"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80A6
|
||||
USB_PRODUCT = "Saola 1 w/WROVER"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80AA
|
||||
USB_PRODUCT = "Franzininho WIFI w/Wroom"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80AD
|
||||
USB_PRODUCT = "Franzininho WIFI w/Wrover"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80A4
|
||||
USB_PRODUCT = "Cucumber M"
|
||||
USB_MANUFACTURER = "Gravitech"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80A7
|
||||
USB_PRODUCT = "Cucumber MS"
|
||||
USB_MANUFACTURER = "Gravitech"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80A1
|
||||
USB_PRODUCT = "Cucumber R"
|
||||
USB_MANUFACTURER = "Gravitech"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x800D
|
||||
USB_PRODUCT = "Cucumber RS"
|
||||
USB_MANUFACTURER = "Gravitech"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x8007
|
||||
USB_PRODUCT = "TTGO T8 ESP32-S2"
|
||||
USB_MANUFACTURER = "LILYGO"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80C3
|
||||
USB_PRODUCT = "S2 Mini"
|
||||
USB_MANUFACTURER = "Lolin"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80C6
|
||||
USB_PRODUCT = "microS2"
|
||||
USB_MANUFACTURER = "microDev"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80B7
|
||||
USB_PRODUCT = "MORPHESP-240"
|
||||
USB_MANUFACTURER = "MORPHEANS"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80DE
|
||||
USB_PRODUCT = "nanoESP32-S2 w/Wroom"
|
||||
USB_MANUFACTURER = "Muselab"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80B2
|
||||
USB_PRODUCT = "nanoESP32-S2 w/Wrover"
|
||||
USB_MANUFACTURER = "Muselab"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x4DF0
|
||||
USB_PRODUCT = "Pixelwing ESP32S2"
|
||||
USB_MANUFACTURER = "Oak Dev Tech"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x3252
|
||||
USB_PRODUCT = "Targett Module Clip w/Wroom"
|
||||
USB_MANUFACTURER = "Targett"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x3253
|
||||
USB_PRODUCT = "Targett Module Clip w/Wrover"
|
||||
USB_MANUFACTURER = "Targett"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80AC
|
||||
USB_PRODUCT = "FeatherS2"
|
||||
USB_MANUFACTURER = "UnexpectedMaker"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80B5
|
||||
USB_PRODUCT = "FeatherS2 Neo"
|
||||
USB_MANUFACTURER = "UnexpectedMaker"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x80AC
|
||||
USB_PRODUCT = "FeatherS2"
|
||||
USB_MANUFACTURER = "UnexpectedMaker"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -3,6 +3,8 @@ USB_PID = 0x8002
|
||||
USB_PRODUCT = "TinyS2"
|
||||
USB_MANUFACTURER = "UnexpectedMaker"
|
||||
|
||||
IDF_TARGET = esp32s2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -50,4 +50,4 @@ typedef struct {
|
||||
|
||||
extern void alarm_sleep_memory_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM__INIT__H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM__INIT__H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H
|
||||
|
||||
#include "common-hal/alarm/SleepMemory.h"
|
||||
|
||||
@ -33,4 +33,4 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj;
|
||||
|
||||
extern void alarm_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM__INIT__H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
@ -39,4 +39,4 @@ typedef struct {
|
||||
const mcu_pin_obj_t *pin;
|
||||
} analogio_analogin_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
|
@ -25,8 +25,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
@ -40,4 +40,4 @@ typedef struct {
|
||||
|
||||
void analogout_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32F4_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_I2C_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_I2C_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_I2C_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_I2C_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
@ -45,4 +45,4 @@ typedef struct {
|
||||
|
||||
void i2c_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_I2C_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_SPI_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_SPI_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_SPI_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_SPI_H
|
||||
|
||||
#include "driver/spi_master.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
@ -49,4 +49,4 @@ typedef struct {
|
||||
|
||||
void spi_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_SPI_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_SPI_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_UART_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_UART_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_UART_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_UART_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
@ -46,4 +46,4 @@ typedef struct {
|
||||
|
||||
void uart_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_UART_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_UART_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "peripherals/pcnt.h"
|
||||
@ -37,4 +37,4 @@ typedef struct {
|
||||
pcnt_unit_t unit;
|
||||
} countio_counter_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_COUNTIO_COUNT_H
|
||||
|
@ -25,8 +25,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
@ -36,4 +36,4 @@ typedef struct {
|
||||
bool output_value;
|
||||
} digitalio_digitalinout_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
|
@ -24,9 +24,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DUALBANK___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DUALBANK___INIT___H
|
||||
|
||||
extern void dualbank_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DUALBANK___INIT___H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "peripherals/pcnt.h"
|
||||
@ -42,4 +42,4 @@ typedef struct {
|
||||
uint16_t capture_period;
|
||||
} frequencyio_frequencyin_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
|
||||
#include "py/mphal.h"
|
||||
|
||||
@ -41,4 +41,4 @@ void claim_pin_number(gpio_num_t pin_number);
|
||||
bool pin_number_is_free(gpio_num_t pin_number);
|
||||
void never_reset_pin_number(gpio_num_t pin_number);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
|
||||
#define COMMON_HAL_MCU_PROCESSOR_UID_LENGTH 6
|
||||
|
||||
@ -36,4 +36,4 @@ typedef struct {
|
||||
// Stores no state currently.
|
||||
} mcu_processor_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
|
@ -91,7 +91,7 @@ static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, si
|
||||
void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, uint8_t *pixels, uint32_t numBytes) {
|
||||
// Reserve channel
|
||||
uint8_t number = digitalinout->pin->number;
|
||||
rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt();
|
||||
rmt_channel_t channel = peripherals_find_and_reserve_rmt();
|
||||
if (channel == RMT_CHANNEL_MAX) {
|
||||
mp_raise_RuntimeError(translate("All timers in use"));
|
||||
}
|
||||
@ -123,7 +123,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
|
||||
rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100));
|
||||
|
||||
// Free channel again
|
||||
esp32s2_peripherals_free_rmt(config.channel);
|
||||
peripherals_free_rmt(config.channel);
|
||||
// Swap pin back to GPIO mode
|
||||
gpio_set_direction(digitalinout->pin->number, GPIO_MODE_OUTPUT);
|
||||
}
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -35,4 +35,4 @@ typedef struct {
|
||||
uint32_t len;
|
||||
} nvm_bytearray_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
|
@ -36,8 +36,8 @@ STATIC const qstr os_uname_info_fields[] = {
|
||||
MP_QSTR_sysname, MP_QSTR_nodename,
|
||||
MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine
|
||||
};
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, "esp32s2");
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, "esp32s2");
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, MICROPY_HW_MCU_NAME);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, MICROPY_HW_MCU_NAME);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_release_obj, MICROPY_VERSION_STRING);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_version_obj, MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_machine_obj, MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME);
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
|
||||
#include "common-hal/digitalio/DigitalInOut.h"
|
||||
|
||||
@ -44,4 +44,4 @@ typedef struct {
|
||||
uint32_t write_mask; // bit mask for the single bit for the write pin register
|
||||
} paralleldisplay_parallelbus_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PS2IO_PS2_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PS2IO_PS2_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
@ -57,4 +57,4 @@ typedef struct {
|
||||
|
||||
void ps2_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PS2IO_PS2_H
|
||||
|
@ -31,7 +31,7 @@
|
||||
STATIC uint8_t refcount = 0;
|
||||
STATIC pulseio_pulsein_obj_t *handles[RMT_CHANNEL_MAX];
|
||||
|
||||
// Requires rmt.c void esp32s2_peripherals_reset_all(void) to reset
|
||||
// Requires rmt.c void peripherals_reset_all(void) to reset
|
||||
|
||||
STATIC void update_internal_buffer(pulseio_pulsein_obj_t *self) {
|
||||
uint32_t length = 0;
|
||||
@ -106,7 +106,7 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, const mcu
|
||||
}
|
||||
|
||||
// Find a free RMT Channel and configure it
|
||||
rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt();
|
||||
rmt_channel_t channel = peripherals_find_and_reserve_rmt();
|
||||
if (channel == RMT_CHANNEL_MAX) {
|
||||
mp_raise_RuntimeError(translate("All timers in use"));
|
||||
}
|
||||
@ -136,7 +136,7 @@ bool common_hal_pulseio_pulsein_deinited(pulseio_pulsein_obj_t *self) {
|
||||
|
||||
void common_hal_pulseio_pulsein_deinit(pulseio_pulsein_obj_t *self) {
|
||||
handles[self->channel] = NULL;
|
||||
esp32s2_peripherals_free_rmt(self->channel);
|
||||
peripherals_free_rmt(self->channel);
|
||||
reset_pin_number(self->pin->number);
|
||||
refcount--;
|
||||
if (refcount == 0) {
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
@ -53,4 +53,4 @@ typedef struct {
|
||||
void pulsein_reset(void);
|
||||
void pulsein_background(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
|
@ -29,14 +29,14 @@
|
||||
#include "shared-bindings/pwmio/PWMOut.h"
|
||||
#include "py/runtime.h"
|
||||
|
||||
// Requires rmt.c void esp32s2_peripherals_reset_all(void) to reset
|
||||
// Requires rmt.c void peripherals_reset_all(void) to reset
|
||||
|
||||
void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self,
|
||||
const mcu_pin_obj_t *pin,
|
||||
uint32_t frequency,
|
||||
uint16_t duty_cycle) {
|
||||
|
||||
rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt();
|
||||
rmt_channel_t channel = peripherals_find_and_reserve_rmt();
|
||||
if (channel == RMT_CHANNEL_MAX) {
|
||||
mp_raise_RuntimeError(translate("All timers in use"));
|
||||
}
|
||||
@ -59,7 +59,7 @@ bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) {
|
||||
}
|
||||
|
||||
void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) {
|
||||
esp32s2_peripherals_free_rmt(self->channel);
|
||||
peripherals_free_rmt(self->channel);
|
||||
self->channel = RMT_CHANNEL_MAX;
|
||||
|
||||
}
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "components/driver/include/driver/rmt.h"
|
||||
@ -38,4 +38,4 @@ typedef struct {
|
||||
rmt_channel_t channel;
|
||||
} pulseio_pulseout_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "components/driver/include/driver/ledc.h"
|
||||
@ -42,4 +42,4 @@ typedef struct {
|
||||
|
||||
void pwmout_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "peripherals/pcnt.h"
|
||||
@ -37,4 +37,4 @@ typedef struct {
|
||||
pcnt_unit_t unit;
|
||||
} rotaryio_incrementalencoder_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
|
@ -24,11 +24,11 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_RTC_RTC_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_RTC_RTC_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_RTC_RTC_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_RTC_RTC_H
|
||||
|
||||
extern void rtc_init(void);
|
||||
extern void rtc_reset(void);
|
||||
extern void common_hal_rtc_init(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_RTC_RTC_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_RTC_RTC_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -48,4 +48,4 @@ typedef struct {
|
||||
void socket_reset(void);
|
||||
bool register_open_socket(socketpool_socket_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -33,4 +33,4 @@ typedef struct {
|
||||
mp_obj_base_t base;
|
||||
} socketpool_socketpool_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -36,4 +36,4 @@ typedef struct {
|
||||
esp_tls_cfg_t ssl_config;
|
||||
} ssl_sslcontext_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSL_CONTEXT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSL_CONTEXT_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -41,4 +41,4 @@ typedef struct {
|
||||
ssl_sslcontext_obj_t *ssl_context;
|
||||
} ssl_sslsocket_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL___INIT___H
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL___INIT___H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -34,4 +34,4 @@ typedef struct {
|
||||
// Stores no state currently.
|
||||
} super_runtime_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
@ -36,4 +36,4 @@ typedef struct {
|
||||
uint16_t threshold;
|
||||
} touchio_touchin_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "shared-bindings/watchdog/WatchDogMode.h"
|
||||
@ -40,4 +40,4 @@ struct _watchdog_watchdogtimer_obj_t {
|
||||
// This needs to be called in order to disable the watchdog
|
||||
void watchdog_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_NETWORK_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_NETWORK_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_NETWORK_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_NETWORK_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -36,4 +36,4 @@ typedef struct {
|
||||
wifi_ap_record_t record;
|
||||
} wifi_network_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_NETWORK_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_NETWORK_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_RADIO_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_RADIO_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_RADIO_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_RADIO_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -65,4 +65,4 @@ typedef struct {
|
||||
|
||||
extern void common_hal_wifi_radio_gc_collect(wifi_radio_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_RADIO_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_RADIO_H
|
||||
|
@ -25,8 +25,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -59,4 +59,4 @@ typedef struct {
|
||||
void wifi_scannednetworks_scan_next_channel(wifi_scannednetworks_obj_t *self);
|
||||
void wifi_scannednetworks_deinit(wifi_scannednetworks_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI___INIT___H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -35,4 +35,4 @@ void wifi_reset(void);
|
||||
|
||||
void ipaddress_ipaddress_to_esp_idf(mp_obj_t ip_address, ip_addr_t *esp_ip_address);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI___INIT___H
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 48ae2309fd9cea600ff960b61a029892be1fdc1b
|
||||
Subproject commit e493a4c30e1b2f7c54a376327388b9e12262cbbf
|
@ -7,6 +7,4 @@ CONFIG_ESP_CONSOLE_NONE=y
|
||||
CONFIG_ESP_CONSOLE_UART_NUM=-1
|
||||
CONFIG_CONSOLE_UART_NUM=-1
|
||||
# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set
|
||||
CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y
|
||||
# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set
|
||||
CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y
|
||||
CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* This file is part of the Micro Python project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_CONFIG_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_CONFIG_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
extern const mp_obj_type_t mcu_pin_type;
|
||||
|
||||
#define PIN_PREFIX_VALUES { &mcu_pin_type },
|
||||
#define PIN_PREFIX_FIELDS mp_obj_base_t base;
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_CONFIG_H
|
@ -25,11 +25,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_MODULES_MODULE_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_MODULES_MODULE_H
|
||||
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
|
||||
void never_reset_module_internal_pins(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_MODULES_MODULE_H
|
||||
|
@ -25,13 +25,13 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef ESP32S2_MPCONFIGPORT_H__
|
||||
#define ESP32S2_MPCONFIGPORT_H__
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H
|
||||
|
||||
#define MICROPY_NLR_THUMB (0)
|
||||
|
||||
#define MICROPY_USE_INTERNAL_PRINTF (0)
|
||||
#define MICROPY_PY_SYS_PLATFORM "Espressif ESP32-S2"
|
||||
#define MICROPY_PY_SYS_PLATFORM "Espressif"
|
||||
|
||||
#include "py/circuitpy_mpconfig.h"
|
||||
|
||||
@ -61,4 +61,4 @@
|
||||
#ifndef CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP
|
||||
#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0)
|
||||
#endif
|
||||
#endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __ESP32S2_HAL
|
||||
#define __ESP32S2_HAL
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_MPHAL_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_MPHAL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -38,4 +38,4 @@
|
||||
|
||||
bool mp_hal_stdin_any(void);
|
||||
|
||||
#endif
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_MPHAL_H
|
||||
|
71
ports/espressif/peripherals/esp32s2/pins.c
Normal file
71
ports/espressif/peripherals/esp32s2/pins.c
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* This file is part of the Micro Python project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/pins.h"
|
||||
|
||||
const mcu_pin_obj_t pin_GPIO0 = PIN(0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1);
|
||||
const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2);
|
||||
const mcu_pin_obj_t pin_GPIO3 = PIN(3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH_PAD_NUM3);
|
||||
const mcu_pin_obj_t pin_GPIO4 = PIN(4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH_PAD_NUM4);
|
||||
const mcu_pin_obj_t pin_GPIO5 = PIN(5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH_PAD_NUM5);
|
||||
const mcu_pin_obj_t pin_GPIO6 = PIN(6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH_PAD_NUM6);
|
||||
const mcu_pin_obj_t pin_GPIO7 = PIN(7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH_PAD_NUM7);
|
||||
const mcu_pin_obj_t pin_GPIO8 = PIN(8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH_PAD_NUM8);
|
||||
const mcu_pin_obj_t pin_GPIO9 = PIN(9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH_PAD_NUM9);
|
||||
const mcu_pin_obj_t pin_GPIO10 = PIN(10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH_PAD_NUM10);
|
||||
const mcu_pin_obj_t pin_GPIO11 = PIN(11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH_PAD_NUM11);
|
||||
const mcu_pin_obj_t pin_GPIO12 = PIN(12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH_PAD_NUM12);
|
||||
const mcu_pin_obj_t pin_GPIO13 = PIN(13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH_PAD_NUM13);
|
||||
const mcu_pin_obj_t pin_GPIO14 = PIN(14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH_PAD_NUM14);
|
||||
const mcu_pin_obj_t pin_GPIO15 = PIN(15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO16 = PIN(16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO17 = PIN(17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO18 = PIN(18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO19 = PIN(19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO20 = PIN(20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO21 = PIN(21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO26 = PIN(26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO27 = PIN(27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO28 = PIN(28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO29 = PIN(29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO30 = PIN(30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO31 = PIN(31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO32 = PIN(32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO33 = PIN(33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO34 = PIN(34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO35 = PIN(35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO36 = PIN(36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO37 = PIN(37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO38 = PIN(38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO39 = PIN(39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO40 = PIN(40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO41 = PIN(41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO42 = PIN(42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO43 = PIN(43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO44 = PIN(44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO45 = PIN(45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
const mcu_pin_obj_t pin_GPIO46 = PIN(46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
78
ports/espressif/peripherals/esp32s2/pins.h
Normal file
78
ports/espressif/peripherals/esp32s2/pins.h
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the Micro Python project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// DO NOT include this file directly.
|
||||
// Use shared-bindings/microcontroller/Pin.h instead.
|
||||
// This ensures that all necessary includes are already included.
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S2_PINS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S2_PINS_H
|
||||
|
||||
extern const mcu_pin_obj_t pin_GPIO0;
|
||||
extern const mcu_pin_obj_t pin_GPIO1;
|
||||
extern const mcu_pin_obj_t pin_GPIO2;
|
||||
extern const mcu_pin_obj_t pin_GPIO3;
|
||||
extern const mcu_pin_obj_t pin_GPIO4;
|
||||
extern const mcu_pin_obj_t pin_GPIO5;
|
||||
extern const mcu_pin_obj_t pin_GPIO6;
|
||||
extern const mcu_pin_obj_t pin_GPIO7;
|
||||
extern const mcu_pin_obj_t pin_GPIO8;
|
||||
extern const mcu_pin_obj_t pin_GPIO9;
|
||||
extern const mcu_pin_obj_t pin_GPIO10;
|
||||
extern const mcu_pin_obj_t pin_GPIO11;
|
||||
extern const mcu_pin_obj_t pin_GPIO12;
|
||||
extern const mcu_pin_obj_t pin_GPIO13;
|
||||
extern const mcu_pin_obj_t pin_GPIO14;
|
||||
extern const mcu_pin_obj_t pin_GPIO15;
|
||||
extern const mcu_pin_obj_t pin_GPIO16;
|
||||
extern const mcu_pin_obj_t pin_GPIO17;
|
||||
extern const mcu_pin_obj_t pin_GPIO18;
|
||||
extern const mcu_pin_obj_t pin_GPIO19;
|
||||
extern const mcu_pin_obj_t pin_GPIO20;
|
||||
extern const mcu_pin_obj_t pin_GPIO21;
|
||||
extern const mcu_pin_obj_t pin_GPIO26;
|
||||
extern const mcu_pin_obj_t pin_GPIO27;
|
||||
extern const mcu_pin_obj_t pin_GPIO28;
|
||||
extern const mcu_pin_obj_t pin_GPIO29;
|
||||
extern const mcu_pin_obj_t pin_GPIO30;
|
||||
extern const mcu_pin_obj_t pin_GPIO31;
|
||||
extern const mcu_pin_obj_t pin_GPIO32;
|
||||
extern const mcu_pin_obj_t pin_GPIO33;
|
||||
extern const mcu_pin_obj_t pin_GPIO34;
|
||||
extern const mcu_pin_obj_t pin_GPIO35;
|
||||
extern const mcu_pin_obj_t pin_GPIO36;
|
||||
extern const mcu_pin_obj_t pin_GPIO37;
|
||||
extern const mcu_pin_obj_t pin_GPIO38;
|
||||
extern const mcu_pin_obj_t pin_GPIO39;
|
||||
extern const mcu_pin_obj_t pin_GPIO40;
|
||||
extern const mcu_pin_obj_t pin_GPIO41;
|
||||
extern const mcu_pin_obj_t pin_GPIO42;
|
||||
extern const mcu_pin_obj_t pin_GPIO43;
|
||||
extern const mcu_pin_obj_t pin_GPIO44;
|
||||
extern const mcu_pin_obj_t pin_GPIO45;
|
||||
extern const mcu_pin_obj_t pin_GPIO46;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S2_PINS_H
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H
|
||||
|
||||
#include "driver/pcnt.h"
|
||||
|
||||
@ -33,4 +33,4 @@ extern int peripherals_pcnt_init(pcnt_config_t pcnt_config);
|
||||
extern void peripherals_pcnt_deinit(pcnt_unit_t *unit);
|
||||
extern void peripherals_pcnt_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H
|
||||
|
@ -1,86 +0,0 @@
|
||||
/*
|
||||
* This file is part of the Micro Python project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/pins.h"
|
||||
|
||||
#define NO_ADC 0
|
||||
#define NO_ADC_CHANNEL ADC_CHANNEL_MAX
|
||||
|
||||
#define NO_TOUCH_CHANNEL TOUCH_PAD_MAX
|
||||
|
||||
// This macro is used to simplify pin definition in boards/<board>/pins.c
|
||||
#define PIN(p_name, p_number, p_adc_index, p_adc_channel, p_touch_channel) \
|
||||
const mcu_pin_obj_t pin_##p_name = { \
|
||||
PIN_PREFIX_VALUES \
|
||||
.number = p_number, \
|
||||
.adc_index = p_adc_index, \
|
||||
.adc_channel = p_adc_channel, \
|
||||
.touch_channel = p_touch_channel, \
|
||||
}
|
||||
|
||||
PIN(GPIO0, 0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO1, 1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1);
|
||||
PIN(GPIO2, 2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2);
|
||||
PIN(GPIO3, 3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH_PAD_NUM3);
|
||||
PIN(GPIO4, 4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH_PAD_NUM4);
|
||||
PIN(GPIO5, 5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH_PAD_NUM5);
|
||||
PIN(GPIO6, 6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH_PAD_NUM6);
|
||||
PIN(GPIO7, 7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH_PAD_NUM7);
|
||||
PIN(GPIO8, 8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH_PAD_NUM8);
|
||||
PIN(GPIO9, 9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH_PAD_NUM9);
|
||||
PIN(GPIO10, 10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH_PAD_NUM10);
|
||||
PIN(GPIO11, 11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH_PAD_NUM11);
|
||||
PIN(GPIO12, 12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH_PAD_NUM12);
|
||||
PIN(GPIO13, 13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH_PAD_NUM13);
|
||||
PIN(GPIO14, 14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH_PAD_NUM14);
|
||||
PIN(GPIO15, 15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO16, 16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO17, 17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO18, 18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO19, 19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO20, 20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO21, 21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO26, 26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO27, 27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO28, 28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO29, 29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO30, 30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO31, 31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO32, 32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO33, 33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO34, 34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO35, 35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO36, 36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO37, 37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO38, 38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO39, 39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO40, 40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO41, 41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO42, 42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO43, 43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO44, 44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO45, 45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
||||
PIN(GPIO46, 46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
|
@ -24,73 +24,49 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// DO NOT include this file directly. Use shared-bindings/microcontroller/Pin.h instead to ensure
|
||||
// that all necessary includes are already included.
|
||||
// DO NOT include this file directly.
|
||||
// Use shared-bindings/microcontroller/Pin.h instead.
|
||||
// This ensures that all necessary includes are already included.
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PINS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PINS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp32s2_peripherals_config.h"
|
||||
#include "esp-idf/config/sdkconfig.h"
|
||||
#include "py/obj.h"
|
||||
|
||||
#include "components/hal/include/hal/gpio_types.h"
|
||||
#include "components/hal/include/hal/adc_types.h"
|
||||
#include "components/hal/include/hal/touch_sensor_types.h"
|
||||
|
||||
typedef struct {
|
||||
PIN_PREFIX_FIELDS
|
||||
mp_obj_base_t base;
|
||||
gpio_num_t number;
|
||||
uint8_t adc_index : 2;
|
||||
uint8_t adc_channel : 6;
|
||||
touch_pad_t touch_channel;
|
||||
} mcu_pin_obj_t;
|
||||
|
||||
extern const mcu_pin_obj_t pin_GPIO0;
|
||||
extern const mcu_pin_obj_t pin_GPIO1;
|
||||
extern const mcu_pin_obj_t pin_GPIO2;
|
||||
extern const mcu_pin_obj_t pin_GPIO3;
|
||||
extern const mcu_pin_obj_t pin_GPIO4;
|
||||
extern const mcu_pin_obj_t pin_GPIO5;
|
||||
extern const mcu_pin_obj_t pin_GPIO6;
|
||||
extern const mcu_pin_obj_t pin_GPIO7;
|
||||
extern const mcu_pin_obj_t pin_GPIO8;
|
||||
extern const mcu_pin_obj_t pin_GPIO9;
|
||||
extern const mcu_pin_obj_t pin_GPIO10;
|
||||
extern const mcu_pin_obj_t pin_GPIO11;
|
||||
extern const mcu_pin_obj_t pin_GPIO12;
|
||||
extern const mcu_pin_obj_t pin_GPIO13;
|
||||
extern const mcu_pin_obj_t pin_GPIO14;
|
||||
extern const mcu_pin_obj_t pin_GPIO15;
|
||||
extern const mcu_pin_obj_t pin_GPIO16;
|
||||
extern const mcu_pin_obj_t pin_GPIO17;
|
||||
extern const mcu_pin_obj_t pin_GPIO18;
|
||||
extern const mcu_pin_obj_t pin_GPIO19;
|
||||
extern const mcu_pin_obj_t pin_GPIO20;
|
||||
extern const mcu_pin_obj_t pin_GPIO21;
|
||||
extern const mcu_pin_obj_t pin_GPIO26;
|
||||
extern const mcu_pin_obj_t pin_GPIO27;
|
||||
extern const mcu_pin_obj_t pin_GPIO28;
|
||||
extern const mcu_pin_obj_t pin_GPIO29;
|
||||
extern const mcu_pin_obj_t pin_GPIO30;
|
||||
extern const mcu_pin_obj_t pin_GPIO31;
|
||||
extern const mcu_pin_obj_t pin_GPIO32;
|
||||
extern const mcu_pin_obj_t pin_GPIO33;
|
||||
extern const mcu_pin_obj_t pin_GPIO34;
|
||||
extern const mcu_pin_obj_t pin_GPIO35;
|
||||
extern const mcu_pin_obj_t pin_GPIO36;
|
||||
extern const mcu_pin_obj_t pin_GPIO37;
|
||||
extern const mcu_pin_obj_t pin_GPIO38;
|
||||
extern const mcu_pin_obj_t pin_GPIO39;
|
||||
extern const mcu_pin_obj_t pin_GPIO40;
|
||||
extern const mcu_pin_obj_t pin_GPIO41;
|
||||
extern const mcu_pin_obj_t pin_GPIO42;
|
||||
extern const mcu_pin_obj_t pin_GPIO43;
|
||||
extern const mcu_pin_obj_t pin_GPIO44;
|
||||
extern const mcu_pin_obj_t pin_GPIO45;
|
||||
extern const mcu_pin_obj_t pin_GPIO46;
|
||||
extern const mp_obj_type_t mcu_pin_type;
|
||||
|
||||
#define NO_PIN (GPIO_NUM_NC)
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PINS_H
|
||||
#define NO_ADC 0
|
||||
#define NO_ADC_CHANNEL ADC_CHANNEL_MAX
|
||||
|
||||
#define NO_TOUCH_CHANNEL TOUCH_PAD_MAX
|
||||
|
||||
// This macro is used to simplify pin definition in boards/<board>/pins.c
|
||||
#define PIN(p_number, p_adc_index, p_adc_channel, p_touch_channel) \
|
||||
{ \
|
||||
{ &mcu_pin_type }, \
|
||||
.number = p_number, \
|
||||
.adc_index = p_adc_index, \
|
||||
.adc_channel = p_adc_channel, \
|
||||
.touch_channel = p_touch_channel, \
|
||||
}
|
||||
|
||||
// Choose based on chip
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
#include "esp32s2/pins.h"
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H
|
||||
|
@ -29,15 +29,15 @@
|
||||
|
||||
bool rmt_reserved_channels[RMT_CHANNEL_MAX];
|
||||
|
||||
void esp32s2_peripherals_rmt_reset(void) {
|
||||
void peripherals_rmt_reset(void) {
|
||||
for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) {
|
||||
if (rmt_reserved_channels[i]) {
|
||||
esp32s2_peripherals_free_rmt(i);
|
||||
peripherals_free_rmt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void) {
|
||||
rmt_channel_t peripherals_find_and_reserve_rmt(void) {
|
||||
for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) {
|
||||
if (!rmt_reserved_channels[i]) {
|
||||
rmt_reserved_channels[i] = true;
|
||||
@ -48,7 +48,7 @@ rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void) {
|
||||
return RMT_CHANNEL_MAX;
|
||||
}
|
||||
|
||||
void esp32s2_peripherals_free_rmt(rmt_channel_t chan) {
|
||||
void peripherals_free_rmt(rmt_channel_t chan) {
|
||||
rmt_reserved_channels[chan] = false;
|
||||
rmt_driver_uninstall(chan);
|
||||
}
|
||||
|
@ -24,15 +24,15 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H
|
||||
|
||||
#include "py/mphal.h"
|
||||
#include "components/driver/include/driver/rmt.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void esp32s2_peripherals_rmt_reset(void);
|
||||
rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void);
|
||||
void esp32s2_peripherals_free_rmt(rmt_channel_t chan);
|
||||
void peripherals_rmt_reset(void);
|
||||
rmt_channel_t peripherals_find_and_reserve_rmt(void);
|
||||
void peripherals_free_rmt(rmt_channel_t chan);
|
||||
|
||||
#endif
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H
|
||||
|
||||
#include "driver/timer.h"
|
||||
|
||||
@ -40,4 +40,4 @@ extern void peripherals_timer_deinit(timer_index_t *timer);
|
||||
extern void peripherals_timer_reset(void);
|
||||
extern void peripherals_timer_never_reset(timer_index_t *timer);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TOUCH_HANDLER_H
|
||||
|
||||
#include "driver/touch_pad.h"
|
||||
|
||||
@ -33,4 +33,4 @@ extern void peripherals_touch_reset(void);
|
||||
extern void peripherals_touch_never_reset(const bool enable);
|
||||
extern void peripherals_touch_init(const touch_pad_t touchpad);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TOUCH_HANDLER_H
|
||||
|
@ -24,12 +24,12 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_SUPERVISOR_PORT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_SUPERVISOR_PORT_H
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
extern TaskHandle_t circuitpython_task;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_SUPERVISOR_PORT_H
|
||||
|
@ -24,8 +24,8 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -35,4 +35,4 @@
|
||||
#define INTERNAL_FLASH_SYSTICK_MASK (0x1ff) // 512ms
|
||||
#define INTERNAL_FLASH_IDLE_TICK(tick) (((tick) & INTERNAL_FLASH_SYSTICK_MASK) == 2)
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_H
|
||||
|
@ -23,9 +23,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
|
||||
#define FLASH_ROOT_POINTERS
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
|
@ -173,27 +173,10 @@ void reset_port(void) {
|
||||
analogout_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_DUALBANK
|
||||
dualbank_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PS2IO
|
||||
ps2_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_AUDIOBUSIO
|
||||
i2s_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PULSEIO
|
||||
esp32s2_peripherals_rmt_reset();
|
||||
pulsein_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PWMIO
|
||||
pwmout_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_BUSIO
|
||||
i2c_reset();
|
||||
spi_reset();
|
||||
@ -204,12 +187,20 @@ void reset_port(void) {
|
||||
peripherals_pcnt_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_DUALBANK
|
||||
dualbank_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_FREQUENCYIO
|
||||
peripherals_timer_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PS2IO
|
||||
ps2_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PULSEIO
|
||||
esp32s2_peripherals_rmt_reset();
|
||||
peripherals_rmt_reset();
|
||||
pulsein_reset();
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user