From dbdfc3e9c2da505053508f8d949c310564259995 Mon Sep 17 00:00:00 2001 From: Pete Lewis Date: Wed, 31 Mar 2021 15:22:55 -0600 Subject: [PATCH] SparkFun ESP32-S2 Thing Plus support --- boards.txt | 283 ++++++++++++++++------ variants/esp32s2thing_plus/pins_arduino.h | 77 ++++++ 2 files changed, 289 insertions(+), 71 deletions(-) create mode 100644 variants/esp32s2thing_plus/pins_arduino.h diff --git a/boards.txt b/boards.txt index 0a7260ea133..8a6c5b26911 100644 --- a/boards.txt +++ b/boards.txt @@ -1545,6 +1545,218 @@ esp32thing_plus.menu.DebugLevel.debug.build.code_debug=4 esp32thing_plus.menu.DebugLevel.verbose=Verbose esp32thing_plus.menu.DebugLevel.verbose.build.code_debug=5 +############################################################## + +sparkfun_esp32s2_thing_plus.name=SparkFun ESP32-S2 Thing Plus +sparkfun_esp32s2_thing_plus.vid.0=0x1B4F +sparkfun_esp32s2_thing_plus.pid.0=0x0027 + +sparkfun_esp32s2_thing_plus.upload.tool=esptool_py +sparkfun_esp32s2_thing_plus.upload.maximum_size=1310720 +sparkfun_esp32s2_thing_plus.upload.maximum_data_size=327680 +sparkfun_esp32s2_thing_plus.upload.flags= + +sparkfun_esp32s2_thing_plus.serial.disableDTR=false +sparkfun_esp32s2_thing_plus.serial.disableRTS=false + +sparkfun_esp32s2_thing_plus.build.mcu=esp32s2 +sparkfun_esp32s2_thing_plus.build.core=esp32 +sparkfun_esp32s2_thing_plus.build.variant=esp32s2thing_plus +sparkfun_esp32s2_thing_plus.build.board=ESP32S2_THING_PLUS + +sparkfun_esp32s2_thing_plus.build.serial=0 +sparkfun_esp32s2_thing_plus.build.f_cpu=240000000L +sparkfun_esp32s2_thing_plus.build.flash_size=4MB +sparkfun_esp32s2_thing_plus.build.flash_freq=80m +sparkfun_esp32s2_thing_plus.build.flash_mode=qio +sparkfun_esp32s2_thing_plus.build.boot=qio +sparkfun_esp32s2_thing_plus.build.partitions=default +sparkfun_esp32s2_thing_plus.build.defines= + +sparkfun_esp32s2_thing_plus.menu.SerialMode.default=UART0 +sparkfun_esp32s2_thing_plus.menu.SerialMode.default.build.serial=0 +sparkfun_esp32s2_thing_plus.menu.SerialMode.cdc=USB CDC +sparkfun_esp32s2_thing_plus.menu.SerialMode.cdc.build.serial=1 + +sparkfun_esp32s2_thing_plus.menu.PSRAM.disabled=Disabled +sparkfun_esp32s2_thing_plus.menu.PSRAM.disabled.build.defines= +sparkfun_esp32s2_thing_plus.menu.PSRAM.enabled=Enabled +sparkfun_esp32s2_thing_plus.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM + +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.default.build.partitions=default +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.minimal.build.partitions=minimal +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.no_ota.build.partitions=no_ota +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.huge_app.build.partitions=huge_app +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.fatflash.build.partitions=ffat +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 + +sparkfun_esp32s2_thing_plus.menu.CPUFreq.240=240MHz (WiFi) +sparkfun_esp32s2_thing_plus.menu.CPUFreq.240.build.f_cpu=240000000L +sparkfun_esp32s2_thing_plus.menu.CPUFreq.160=160MHz (WiFi) +sparkfun_esp32s2_thing_plus.menu.CPUFreq.160.build.f_cpu=160000000L +sparkfun_esp32s2_thing_plus.menu.CPUFreq.80=80MHz (WiFi) +sparkfun_esp32s2_thing_plus.menu.CPUFreq.80.build.f_cpu=80000000L +sparkfun_esp32s2_thing_plus.menu.CPUFreq.40=40MHz +sparkfun_esp32s2_thing_plus.menu.CPUFreq.40.build.f_cpu=40000000L +sparkfun_esp32s2_thing_plus.menu.CPUFreq.20=20MHz +sparkfun_esp32s2_thing_plus.menu.CPUFreq.20.build.f_cpu=20000000L +sparkfun_esp32s2_thing_plus.menu.CPUFreq.10=10MHz +sparkfun_esp32s2_thing_plus.menu.CPUFreq.10.build.f_cpu=10000000L + +sparkfun_esp32s2_thing_plus.menu.FlashMode.qio=QIO +sparkfun_esp32s2_thing_plus.menu.FlashMode.qio.build.flash_mode=dio +sparkfun_esp32s2_thing_plus.menu.FlashMode.qio.build.boot=qio +sparkfun_esp32s2_thing_plus.menu.FlashMode.dio=DIO +sparkfun_esp32s2_thing_plus.menu.FlashMode.dio.build.flash_mode=dio +sparkfun_esp32s2_thing_plus.menu.FlashMode.dio.build.boot=dio +sparkfun_esp32s2_thing_plus.menu.FlashMode.qout=QOUT +sparkfun_esp32s2_thing_plus.menu.FlashMode.qout.build.flash_mode=dout +sparkfun_esp32s2_thing_plus.menu.FlashMode.qout.build.boot=qout +sparkfun_esp32s2_thing_plus.menu.FlashMode.dout=DOUT +sparkfun_esp32s2_thing_plus.menu.FlashMode.dout.build.flash_mode=dout +sparkfun_esp32s2_thing_plus.menu.FlashMode.dout.build.boot=dout + +sparkfun_esp32s2_thing_plus.menu.FlashFreq.80=80MHz +sparkfun_esp32s2_thing_plus.menu.FlashFreq.80.build.flash_freq=80m +sparkfun_esp32s2_thing_plus.menu.FlashFreq.40=40MHz +sparkfun_esp32s2_thing_plus.menu.FlashFreq.40.build.flash_freq=40m + +sparkfun_esp32s2_thing_plus.menu.FlashSize.4M=4MB (32Mb) +sparkfun_esp32s2_thing_plus.menu.FlashSize.4M.build.flash_size=4MB +sparkfun_esp32s2_thing_plus.menu.FlashSize.8M=8MB (64Mb) +sparkfun_esp32s2_thing_plus.menu.FlashSize.8M.build.flash_size=8MB +sparkfun_esp32s2_thing_plus.menu.FlashSize.8M.build.partitions=default_8MB +sparkfun_esp32s2_thing_plus.menu.FlashSize.2M=2MB (16Mb) +sparkfun_esp32s2_thing_plus.menu.FlashSize.2M.build.flash_size=2MB +sparkfun_esp32s2_thing_plus.menu.FlashSize.2M.build.partitions=minimal +sparkfun_esp32s2_thing_plus.menu.FlashSize.16M=16MB (128Mb) +sparkfun_esp32s2_thing_plus.menu.FlashSize.16M.build.flash_size=16MB + +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.921600=921600 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.921600.upload.speed=921600 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.115200=115200 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.115200.upload.speed=115200 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.256000.windows=256000 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.256000.upload.speed=256000 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.230400.windows.upload.speed=256000 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.230400=230400 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.230400.upload.speed=230400 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.460800.linux=460800 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.460800.macosx=460800 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.460800.upload.speed=460800 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.512000.windows=512000 +sparkfun_esp32s2_thing_plus.menu.UploadSpeed.512000.upload.speed=512000 + +sparkfun_esp32s2_thing_plus.menu.DebugLevel.none=None +sparkfun_esp32s2_thing_plus.menu.DebugLevel.none.build.code_debug=0 +sparkfun_esp32s2_thing_plus.menu.DebugLevel.error=Error +sparkfun_esp32s2_thing_plus.menu.DebugLevel.error.build.code_debug=1 +sparkfun_esp32s2_thing_plus.menu.DebugLevel.warn=Warn +sparkfun_esp32s2_thing_plus.menu.DebugLevel.warn.build.code_debug=2 +sparkfun_esp32s2_thing_plus.menu.DebugLevel.info=Info +sparkfun_esp32s2_thing_plus.menu.DebugLevel.info.build.code_debug=3 +sparkfun_esp32s2_thing_plus.menu.DebugLevel.debug=Debug +sparkfun_esp32s2_thing_plus.menu.DebugLevel.debug.build.code_debug=4 +sparkfun_esp32s2_thing_plus.menu.DebugLevel.verbose=Verbose +sparkfun_esp32s2_thing_plus.menu.DebugLevel.verbose.build.code_debug=5 + +############################################################## + +sparkfun_lora_gateway_1-channel.name=SparkFun LoRa Gateway 1-Channel + +sparkfun_lora_gateway_1-channel.upload.tool=esptool_py +sparkfun_lora_gateway_1-channel.upload.maximum_size=1310720 +sparkfun_lora_gateway_1-channel.upload.maximum_data_size=294912 +sparkfun_lora_gateway_1-channel.upload.flags= + +sparkfun_lora_gateway_1-channel.serial.disableDTR=true +sparkfun_lora_gateway_1-channel.serial.disableRTS=true + +sparkfun_lora_gateway_1-channel.build.mcu=esp32 +sparkfun_lora_gateway_1-channel.build.core=esp32 +sparkfun_lora_gateway_1-channel.build.variant=sparkfun_lora_gateway_1-channel +sparkfun_lora_gateway_1-channel.build.board=ESP32_DEV + +sparkfun_lora_gateway_1-channel.build.f_cpu=240000000L +sparkfun_lora_gateway_1-channel.build.flash_size=4MB +sparkfun_lora_gateway_1-channel.build.flash_freq=40m +sparkfun_lora_gateway_1-channel.build.flash_mode=dio +sparkfun_lora_gateway_1-channel.build.boot=dio +sparkfun_lora_gateway_1-channel.build.partitions=default + +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.default=Default +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.default.build.partitions=default +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.minimal=Minimal (2MB FLASH) +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.minimal.build.partitions=minimal +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.no_ota=No OTA (Large APP) +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.no_ota.build.partitions=no_ota +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +sparkfun_lora_gateway_1-channel.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + +sparkfun_lora_gateway_1-channel.menu.FlashMode.qio=QIO +sparkfun_lora_gateway_1-channel.menu.FlashMode.qio.build.flash_mode=dio +sparkfun_lora_gateway_1-channel.menu.FlashMode.qio.build.boot=qio +sparkfun_lora_gateway_1-channel.menu.FlashMode.dio=DIO +sparkfun_lora_gateway_1-channel.menu.FlashMode.dio.build.flash_mode=dio +sparkfun_lora_gateway_1-channel.menu.FlashMode.dio.build.boot=dio +sparkfun_lora_gateway_1-channel.menu.FlashMode.qout=QOUT +sparkfun_lora_gateway_1-channel.menu.FlashMode.qout.build.flash_mode=dout +sparkfun_lora_gateway_1-channel.menu.FlashMode.qout.build.boot=qout +sparkfun_lora_gateway_1-channel.menu.FlashMode.dout=DOUT +sparkfun_lora_gateway_1-channel.menu.FlashMode.dout.build.flash_mode=dout +sparkfun_lora_gateway_1-channel.menu.FlashMode.dout.build.boot=dout + +sparkfun_lora_gateway_1-channel.menu.FlashFreq.80=80MHz +sparkfun_lora_gateway_1-channel.menu.FlashFreq.80.build.flash_freq=80m +sparkfun_lora_gateway_1-channel.menu.FlashFreq.40=40MHz +sparkfun_lora_gateway_1-channel.menu.FlashFreq.40.build.flash_freq=40m + +sparkfun_lora_gateway_1-channel.menu.FlashSize.4M=4MB (32Mb) +sparkfun_lora_gateway_1-channel.menu.FlashSize.4M.build.flash_size=4MB + +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.921600=921600 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.921600.upload.speed=921600 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.115200=115200 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.115200.upload.speed=115200 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.256000.windows=256000 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.256000.upload.speed=256000 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.230400.windows.upload.speed=256000 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.230400=230400 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.230400.upload.speed=230400 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.460800.linux=460800 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.460800.macosx=460800 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.460800.upload.speed=460800 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.512000.windows=512000 +sparkfun_lora_gateway_1-channel.menu.UploadSpeed.512000.upload.speed=512000 ############################################################## @@ -5412,77 +5624,6 @@ esp32cam.menu.FlashFreq.40.build.flash_freq=40m ############################################################## -sparkfun_lora_gateway_1-channel.name=SparkFun LoRa Gateway 1-Channel - -sparkfun_lora_gateway_1-channel.upload.tool=esptool_py -sparkfun_lora_gateway_1-channel.upload.maximum_size=1310720 -sparkfun_lora_gateway_1-channel.upload.maximum_data_size=294912 -sparkfun_lora_gateway_1-channel.upload.flags= - -sparkfun_lora_gateway_1-channel.serial.disableDTR=true -sparkfun_lora_gateway_1-channel.serial.disableRTS=true - -sparkfun_lora_gateway_1-channel.build.mcu=esp32 -sparkfun_lora_gateway_1-channel.build.core=esp32 -sparkfun_lora_gateway_1-channel.build.variant=sparkfun_lora_gateway_1-channel -sparkfun_lora_gateway_1-channel.build.board=ESP32_DEV - -sparkfun_lora_gateway_1-channel.build.f_cpu=240000000L -sparkfun_lora_gateway_1-channel.build.flash_size=4MB -sparkfun_lora_gateway_1-channel.build.flash_freq=40m -sparkfun_lora_gateway_1-channel.build.flash_mode=dio -sparkfun_lora_gateway_1-channel.build.boot=dio -sparkfun_lora_gateway_1-channel.build.partitions=default - -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.default=Default -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.default.build.partitions=default -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.minimal=Minimal (2MB FLASH) -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.minimal.build.partitions=minimal -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.no_ota=No OTA (Large APP) -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.no_ota.build.partitions=no_ota -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -sparkfun_lora_gateway_1-channel.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -sparkfun_lora_gateway_1-channel.menu.FlashMode.qio=QIO -sparkfun_lora_gateway_1-channel.menu.FlashMode.qio.build.flash_mode=dio -sparkfun_lora_gateway_1-channel.menu.FlashMode.qio.build.boot=qio -sparkfun_lora_gateway_1-channel.menu.FlashMode.dio=DIO -sparkfun_lora_gateway_1-channel.menu.FlashMode.dio.build.flash_mode=dio -sparkfun_lora_gateway_1-channel.menu.FlashMode.dio.build.boot=dio -sparkfun_lora_gateway_1-channel.menu.FlashMode.qout=QOUT -sparkfun_lora_gateway_1-channel.menu.FlashMode.qout.build.flash_mode=dout -sparkfun_lora_gateway_1-channel.menu.FlashMode.qout.build.boot=qout -sparkfun_lora_gateway_1-channel.menu.FlashMode.dout=DOUT -sparkfun_lora_gateway_1-channel.menu.FlashMode.dout.build.flash_mode=dout -sparkfun_lora_gateway_1-channel.menu.FlashMode.dout.build.boot=dout - -sparkfun_lora_gateway_1-channel.menu.FlashFreq.80=80MHz -sparkfun_lora_gateway_1-channel.menu.FlashFreq.80.build.flash_freq=80m -sparkfun_lora_gateway_1-channel.menu.FlashFreq.40=40MHz -sparkfun_lora_gateway_1-channel.menu.FlashFreq.40.build.flash_freq=40m - -sparkfun_lora_gateway_1-channel.menu.FlashSize.4M=4MB (32Mb) -sparkfun_lora_gateway_1-channel.menu.FlashSize.4M.build.flash_size=4MB - -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.921600=921600 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.921600.upload.speed=921600 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.115200=115200 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.115200.upload.speed=115200 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.256000.windows=256000 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.256000.upload.speed=256000 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.230400.windows.upload.speed=256000 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.230400=230400 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.230400.upload.speed=230400 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.460800.linux=460800 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.460800.macosx=460800 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.460800.upload.speed=460800 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.512000.windows=512000 -sparkfun_lora_gateway_1-channel.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## - twatch.name=TTGO T-Watch twatch.upload.tool=esptool_py diff --git a/variants/esp32s2thing_plus/pins_arduino.h b/variants/esp32s2thing_plus/pins_arduino.h new file mode 100644 index 00000000000..1bf87ba7657 --- /dev/null +++ b/variants/esp32s2thing_plus/pins_arduino.h @@ -0,0 +1,77 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define USB_VID 0x1B4F +#define USB_PID 0x0027 +#define USB_MANUFACTURER "SparkFun" +#define USB_PRODUCT "ESP32-S2 Thing Plus" +#define USB_SERIAL "" + +#define EXTERNAL_NUM_INTERRUPTS 46 +#define NUM_DIGITAL_PINS 48 +#define NUM_ANALOG_INPUTS 20 + +#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) +#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) +#define digitalPinHasPWM(p) (p < 46) + +static const uint8_t LED_BUILTIN = 13; +#define BUILTIN_LED LED_BUILTIN // backward compatibility + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +#define TX1 34 +#define RX1 33 + +static const uint8_t SDA = 1; +static const uint8_t SCL = 2; + +static const uint8_t SS = 42; +static const uint8_t MOSI = 35; +static const uint8_t MISO = 37; +static const uint8_t SCK = 36; + +static const uint8_t A0 = 17; +static const uint8_t A1 = 18; +static const uint8_t A2 = 14; +static const uint8_t A3 = 9; +static const uint8_t A4 = 7; +static const uint8_t A5 = 5; + +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +static const uint8_t DAC1 = 17; +static const uint8_t DAC2 = 18; + +#endif /* Pins_Arduino_h */