Skip to content

Commit

Permalink
Merge branch 'master' into ci/style_check
Browse files Browse the repository at this point in the history
  • Loading branch information
P-R-O-C-H-Y authored Jan 31, 2024
2 parents aa5127b + cceebb5 commit d720be2
Show file tree
Hide file tree
Showing 12 changed files with 334 additions and 79 deletions.
91 changes: 84 additions & 7 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20699,7 +20699,7 @@ heltec_wireless_tracker.upload.tool=esptool_py
heltec_wireless_tracker.upload.tool.default=esptool_py
heltec_wireless_tracker.upload.tool.network=esp_ota

heltec_wireless_tracker.upload.maximum_size=3342336
heltec_wireless_tracker.upload.maximum_size=1310720
heltec_wireless_tracker.upload.maximum_data_size=327680
heltec_wireless_tracker.upload.flags=
heltec_wireless_tracker.upload.extra_flags=
Expand All @@ -20722,16 +20722,58 @@ heltec_wireless_tracker.build.cdc_on_boot=0
heltec_wireless_tracker.build.msc_on_boot=0
heltec_wireless_tracker.build.dfu_on_boot=0
heltec_wireless_tracker.build.f_cpu=240000000L
heltec_wireless_tracker.build.flash_size=8MB
heltec_wireless_tracker.build.flash_size=4MB
heltec_wireless_tracker.build.flash_freq=80m
heltec_wireless_tracker.build.flash_mode=dio
heltec_wireless_tracker.build.boot=qio
heltec_wireless_tracker.build.boot_freq=80m
heltec_wireless_tracker.build.partitions=default_8MB
heltec_wireless_tracker.build.partitions=default
heltec_wireless_tracker.build.loop_core=
heltec_wireless_tracker.build.event_core=
heltec_wireless_tracker.build.psram_type=qspi
heltec_wireless_tracker.build.memory_type={build.boot}_{build.psram_type}
heltec_wireless_tracker.build.defines=-D{build.band} {build.psram_val} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} -DLORAWAN_PREAMBLE_LENGTH={build.LORAWAN_PREAMBLE_LENGTH} -DLORAWAN_DEVEUI_AUTO={build.LORAWAN_DEVEUI_AUTO} -D{build.board}

heltec_wireless_tracker.menu.PSRAM.disabled=Disabled
heltec_wireless_tracker.menu.PSRAM.disabled.build.psram_val=
heltec_wireless_tracker.menu.PSRAM.disabled.build.psram_type=qspi
heltec_wireless_tracker.menu.PSRAM.enabled=QSPI PSRAM
heltec_wireless_tracker.menu.PSRAM.enabled.build.psram_val=-DBOARD_HAS_PSRAM
heltec_wireless_tracker.menu.PSRAM.enabled.build.psram_type=qspi
heltec_wireless_tracker.menu.PSRAM.opi=OPI PSRAM
heltec_wireless_tracker.menu.PSRAM.opi.build.psram_val=-DBOARD_HAS_PSRAM
heltec_wireless_tracker.menu.PSRAM.opi.build.psram_type=opi

heltec_wireless_tracker.menu.FlashMode.qio=QIO 80MHz
heltec_wireless_tracker.menu.FlashMode.qio.build.flash_mode=dio
heltec_wireless_tracker.menu.FlashMode.qio.build.boot=qio
heltec_wireless_tracker.menu.FlashMode.qio.build.boot_freq=80m
heltec_wireless_tracker.menu.FlashMode.qio.build.flash_freq=80m
heltec_wireless_tracker.menu.FlashMode.qio120=QIO 120MHz
heltec_wireless_tracker.menu.FlashMode.qio120.build.flash_mode=dio
heltec_wireless_tracker.menu.FlashMode.qio120.build.boot=qio
heltec_wireless_tracker.menu.FlashMode.qio120.build.boot_freq=120m
heltec_wireless_tracker.menu.FlashMode.qio120.build.flash_freq=80m
heltec_wireless_tracker.menu.FlashMode.dio=DIO 80MHz
heltec_wireless_tracker.menu.FlashMode.dio.build.flash_mode=dio
heltec_wireless_tracker.menu.FlashMode.dio.build.boot=dio
heltec_wireless_tracker.menu.FlashMode.dio.build.boot_freq=80m
heltec_wireless_tracker.menu.FlashMode.dio.build.flash_freq=80m
heltec_wireless_tracker.menu.FlashMode.opi=OPI 80MHz
heltec_wireless_tracker.menu.FlashMode.opi.build.flash_mode=dout
heltec_wireless_tracker.menu.FlashMode.opi.build.boot=opi
heltec_wireless_tracker.menu.FlashMode.opi.build.boot_freq=80m
heltec_wireless_tracker.menu.FlashMode.opi.build.flash_freq=80m

heltec_wireless_tracker.menu.FlashSize.4M=4MB (32Mb)
heltec_wireless_tracker.menu.FlashSize.4M.build.flash_size=4MB
heltec_wireless_tracker.menu.FlashSize.8M=8MB (64Mb)
heltec_wireless_tracker.menu.FlashSize.8M.build.flash_size=8MB
heltec_wireless_tracker.menu.FlashSize.8M.build.partitions=default_8MB
heltec_wireless_tracker.menu.FlashSize.16M=16MB (128Mb)
heltec_wireless_tracker.menu.FlashSize.16M.build.flash_size=16MB
#heltec_wireless_tracker.menu.FlashSize.32M=32MB (256Mb)
#heltec_wireless_tracker.menu.FlashSize.32M.build.flash_size=32MB

heltec_wireless_tracker.menu.LoopCore.1=Core 1
heltec_wireless_tracker.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
Expand All @@ -20748,8 +20790,8 @@ heltec_wireless_tracker.menu.USBMode.hwcdc.build.usb_mode=1
heltec_wireless_tracker.menu.USBMode.default=USB-OTG (TinyUSB)
heltec_wireless_tracker.menu.USBMode.default.build.usb_mode=0

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

Expand All @@ -20770,6 +20812,43 @@ heltec_wireless_tracker.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
heltec_wireless_tracker.menu.UploadMode.cdc.upload.use_1200bps_touch=true
heltec_wireless_tracker.menu.UploadMode.cdc.upload.wait_for_upload_port=true

heltec_wireless_tracker.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
heltec_wireless_tracker.menu.PartitionScheme.default.build.partitions=default
heltec_wireless_tracker.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
heltec_wireless_tracker.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
heltec_wireless_tracker.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
heltec_wireless_tracker.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
heltec_wireless_tracker.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
heltec_wireless_tracker.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
heltec_wireless_tracker.menu.PartitionScheme.minimal.build.partitions=minimal
heltec_wireless_tracker.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
heltec_wireless_tracker.menu.PartitionScheme.no_ota.build.partitions=no_ota
heltec_wireless_tracker.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
heltec_wireless_tracker.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
heltec_wireless_tracker.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
heltec_wireless_tracker.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
heltec_wireless_tracker.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
heltec_wireless_tracker.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
heltec_wireless_tracker.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
heltec_wireless_tracker.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
heltec_wireless_tracker.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
heltec_wireless_tracker.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
heltec_wireless_tracker.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
heltec_wireless_tracker.menu.PartitionScheme.huge_app.build.partitions=huge_app
heltec_wireless_tracker.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
heltec_wireless_tracker.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
heltec_wireless_tracker.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
heltec_wireless_tracker.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
heltec_wireless_tracker.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
heltec_wireless_tracker.menu.PartitionScheme.fatflash.build.partitions=ffat
heltec_wireless_tracker.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
heltec_wireless_tracker.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
heltec_wireless_tracker.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
heltec_wireless_tracker.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
heltec_wireless_tracker.menu.PartitionScheme.rainmaker=RainMaker
heltec_wireless_tracker.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
heltec_wireless_tracker.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728

heltec_wireless_tracker.menu.CPUFreq.240=240MHz (WiFi)
heltec_wireless_tracker.menu.CPUFreq.240.build.f_cpu=240000000L
heltec_wireless_tracker.menu.CPUFreq.160=160MHz (WiFi)
Expand Down Expand Up @@ -20851,8 +20930,6 @@ heltec_wireless_tracker.menu.LORAWAN_PREAMBLE_LENGTH.0.build.LORAWAN_PREAMBLE_LE
heltec_wireless_tracker.menu.LORAWAN_PREAMBLE_LENGTH.1=16(For M00 and M00L)
heltec_wireless_tracker.menu.LORAWAN_PREAMBLE_LENGTH.1.build.LORAWAN_PREAMBLE_LENGTH=16

heltec_wireless_tracker.build.defines=-D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} -DLORAWAN_PREAMBLE_LENGTH={build.LORAWAN_PREAMBLE_LENGTH} -DLORAWAN_DEVEUI_AUTO={build.LORAWAN_DEVEUI_AUTO} -D{build.board}

heltec_wireless_tracker.menu.EraseFlash.none=Disabled
heltec_wireless_tracker.menu.EraseFlash.none.upload.erase_cmd=
heltec_wireless_tracker.menu.EraseFlash.all=Enabled
Expand Down
3 changes: 2 additions & 1 deletion cores/esp32/esp32-hal-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ typedef volatile struct {
uint32_t frequency;
#if !CONFIG_DISABLE_HAL_LOCKS
SemaphoreHandle_t lock;
#endif
int8_t scl;
int8_t sda;
#endif

} i2c_bus_t;

static i2c_bus_t bus[SOC_I2C_NUM];
Expand Down
28 changes: 22 additions & 6 deletions idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
description: "Arduino core for ESP32, ESP32-S and ESP32-C series of SoCs"
url: "https://github.com/espressif/arduino-esp32"
license: "LGPL-2.1"
targets:
- esp32
- esp32s2
Expand All @@ -12,19 +13,34 @@ tags:
- arduino
files:
include:
- "cores/**/*"
- "variants/esp32/**/*"
- "variants/esp32s2/**/*"
- "variants/esp32s3/**/*"
- "variants/esp32c2/**/*"
- "variants/esp32c3/**/*"
- "variants/esp32c6/**/*"
- "variants/esp32h2/**/*"
- "libraries/**/*"
- "CMakeLists.txt"
- "Kconfig.projbuild"
exclude:
- "**/*"
- "docs/"
- "docs/**/*"
- "idf_component_examples/"
- "idf_component_examples/**/*"
- "package/"
- "package/**/*"
- "tests/"
- "tests/**/*"
- "tools/"
- "tools/**/*"
- "variants/**/*"
- ".gitignore"
- ".gitmodules"
- ".readthedocs.yaml"
- "boards.txt"
- "CODE_OF_CONDUCT.md"
- "LICENSE.md"
- "package.json"
- "platform.txt"
- "programmers.txt"
dependencies:
idf: ">=5.1"
# mdns 1.2.1 is necessary to build H2 with no WiFi
Expand Down Expand Up @@ -66,5 +82,5 @@ dependencies:
rules:
- if: "target in [esp32s3]"
examples:
- path: idf_component_examples/
- path: ./idf_component_examples/Hello_world

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ framework = arduino
[env:esp32]
platform = espressif32
board = esp32dev
;board_build.partitions = partitions_custom.csv
board_build.partitions = partitions_custom.csv
monitor_filters = esp32_exception_decoder
monitor_speed = 115200

extra_scripts = ./littlefsbuilder.py
Empty file.
64 changes: 64 additions & 0 deletions libraries/WiFi/examples/WiFiMultiAdvanced/WiFiMultiAdvanced.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* This sketch tries to connect to the best AP available
* and tests for captive portals on open networks
*
*/

#include <WiFi.h>
#include <WiFiMulti.h>
#include <HTTPClient.h>

WiFiMulti wifiMulti;

// callback used to check Internet connectivity
bool testConnection(){
HTTPClient http;
http.begin("http://www.espressif.com");
int httpCode = http.GET();
// we expect to get a 301 because it will ask to use HTTPS instead of HTTP
if (httpCode == HTTP_CODE_MOVED_PERMANENTLY) return true;
return false;
}

void setup()
{
Serial.begin(115200);
delay(10);

wifiMulti.addAP("ssid_from_AP_1", "your_password_for_AP_1");
wifiMulti.addAP("ssid_from_AP_2", "your_password_for_AP_2");
wifiMulti.addAP("ssid_from_AP_3", "your_password_for_AP_3");

// These options can help when you need ANY kind of wifi connection to get a config file, report errors, etc.
wifiMulti.setStrictMode(false); // Default is true. Library will disconnect and forget currently connected AP if it's not in the AP list.
wifiMulti.setAllowOpenAP(true); // Default is false. True adds open APs to the AP list.
wifiMulti.setConnectionTestCallbackFunc(testConnection); // Attempts to connect to a remote webserver in case of captive portals.

Serial.println("Connecting Wifi...");
if(wifiMulti.run() == WL_CONNECTED) {
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
}

void loop()
{
static bool isConnected = false;
uint8_t WiFiStatus = wifiMulti.run();

if (WiFiStatus == WL_CONNECTED) {
if (!isConnected) {
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
isConnected = true;
} else {
Serial.println("WiFi not connected!");
isConnected = false;
delay(5000);
}
}
Loading

0 comments on commit d720be2

Please sign in to comment.