Merge branch 'dev' into inline-ansi-reset

This commit is contained in:
J. Nick Koston
2026-03-15 20:42:08 -10:00
committed by GitHub
10 changed files with 82 additions and 12 deletions
@@ -3,6 +3,7 @@
#include "driver/gpio.h"
#include "deep_sleep_component.h"
#include "esphome/core/log.h"
#include <esp_idf_version.h>
namespace esphome {
namespace deep_sleep {
@@ -26,7 +27,7 @@ namespace deep_sleep {
// - ext0: Single pin wakeup using RTC GPIO (esp_sleep_enable_ext0_wakeup)
// - ext1: Multiple pin wakeup (esp_sleep_enable_ext1_wakeup)
// - Touch: Touch pad wakeup (esp_sleep_enable_touchpad_wakeup)
// - GPIO wakeup: GPIO wakeup for RTC pins (esp_deep_sleep_enable_gpio_wakeup)
// - GPIO wakeup: GPIO wakeup for RTC pins
static const char *const TAG = "deep_sleep";
@@ -135,8 +136,13 @@ void DeepSleepComponent::deep_sleep_() {
}
// Internal pullup/pulldown resistors are enabled automatically, when
// ESP_SLEEP_GPIO_ENABLE_INTERNAL_RESISTORS is set (by default it is)
esp_deep_sleep_enable_gpio_wakeup(1 << this->wakeup_pin_->get_pin(),
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
esp_sleep_enable_gpio_wakeup_on_hp_periph_powerdown(1ULL << this->wakeup_pin_->get_pin(),
static_cast<esp_sleep_gpio_wake_up_mode_t>(level));
#else
esp_deep_sleep_enable_gpio_wakeup(1ULL << this->wakeup_pin_->get_pin(),
static_cast<esp_deepsleep_gpio_wake_up_mode_t>(level));
#endif
}
#endif
@@ -7,6 +7,7 @@ from esphome.const import (
CONF_OUTPUT_ID,
CONF_RGB_ORDER,
)
from esphome.core import CORE
CODEOWNERS = ["@OttoWinter"]
fastled_base_ns = cg.esphome_ns.namespace("fastled_base")
@@ -41,5 +42,9 @@ async def new_fastled_light(config):
cg.add(var.set_max_refresh_rate(config[CONF_MAX_REFRESH_RATE]))
cg.add_library("fastled/FastLED", "3.9.16")
if CORE.is_esp32:
from esphome.components.esp32 import include_builtin_idf_component
include_builtin_idf_component("esp_lcd")
await light.register_light(var, config)
return var
@@ -11,6 +11,7 @@ from esphome.components.image import (
)
import esphome.config_validation as cv
from esphome.const import CONF_FORMAT, CONF_ID, CONF_RESIZE, CONF_TYPE
from esphome.core import CORE
AUTO_LOAD = ["image"]
CODEOWNERS = ["@guillempages", "@clydebarrow", "@kahrendt"]
@@ -75,6 +76,13 @@ class JPEGFormat(Format):
def actions(self) -> None:
cg.add_define("USE_RUNTIME_IMAGE_JPEG")
cg.add_library("JPEGDEC", "1.8.4", "https://github.com/bitbank2/JPEGDEC#1.8.4")
if CORE.is_esp32:
from esphome.components.esp32 import add_idf_component
# JPEGDEC uses ESP32-S3 SIMD optimizations (guarded by board-level
# ARDUINO_ESP32S3_DEV define) that require esp-dsp headers.
# On Arduino this overwrites the stub; on IDF it adds the component.
add_idf_component(name="espressif/esp-dsp", ref="1.7.1")
class PNGFormat(Format):
@@ -2,6 +2,7 @@
#include "tinyusb_component.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
#include "tinyusb_default_config.h"
namespace esphome::tinyusb {
@@ -15,19 +16,19 @@ void TinyUSB::setup() {
this->string_descriptor_[SERIAL_NUMBER] = mac_addr_buf;
}
this->tusb_cfg_ = {
.port = TINYUSB_PORT_FULL_SPEED_0,
.phy = {.skip_setup = false},
.descriptor =
{
.device = &this->usb_descriptor_,
.string = this->string_descriptor_,
.string_count = SIZE,
},
// Start from esp_tinyusb defaults to keep required task settings valid across esp_tinyusb updates.
this->tusb_cfg_ = TINYUSB_DEFAULT_CONFIG();
this->tusb_cfg_.port = TINYUSB_PORT_FULL_SPEED_0;
this->tusb_cfg_.phy.skip_setup = false;
this->tusb_cfg_.descriptor = {
.device = &this->usb_descriptor_,
.string = this->string_descriptor_,
.string_count = SIZE,
};
esp_err_t result = tinyusb_driver_install(&this->tusb_cfg_);
if (result != ESP_OK) {
ESP_LOGE(TAG, "tinyusb_driver_install failed: %s", esp_err_to_name(result));
this->mark_failed();
}
}
+5
View File
@@ -4,7 +4,9 @@ from esphome.components.esp32 import (
VARIANT_ESP32P4,
VARIANT_ESP32S2,
VARIANT_ESP32S3,
add_idf_component,
add_idf_sdkconfig_option,
idf_version,
only_on_variant,
)
import esphome.config_validation as cv
@@ -64,6 +66,9 @@ async def register_usb_client(config):
async def to_code(config: ConfigType) -> None:
# IDF 6.0 moved USB host to an external component
if idf_version() >= cv.Version(6, 0, 0):
add_idf_component(name="espressif/usb", ref="1.3.0")
add_idf_sdkconfig_option("CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE", 1024)
if config.get(CONF_ENABLE_HUBS):
add_idf_sdkconfig_option("CONFIG_USB_HOST_HUBS_SUPPORTED", True)
+6
View File
@@ -5,6 +5,8 @@ dependencies:
version: 2.0.3
esphome/micro-opus:
version: 0.3.5
espressif/esp-dsp:
version: "1.7.1"
espressif/esp-tflite-micro:
version: 1.3.3~1
espressif/esp32-camera:
@@ -41,5 +43,9 @@ dependencies:
version: "1.0.0"
rules:
- if: "idf_version >=6.0.0"
espressif/usb:
version: "1.3.0"
rules:
- if: "idf_version >=6.0.0 && target in [esp32s2, esp32s3, esp32p4]"
esp32async/asynctcp:
version: 3.4.91
+1 -1
View File
@@ -12,7 +12,7 @@ platformio==6.1.19
esptool==5.2.0
click==8.3.1
esphome-dashboard==20260210.0
aioesphomeapi==44.5.1
aioesphomeapi==44.5.2
zeroconf==0.148.0
puremagic==1.30
ruamel.yaml==0.19.1 # dashboard_import
@@ -0,0 +1 @@
<<: !include common.yaml
@@ -0,0 +1,19 @@
packages:
spi: !include ../../test_build_components/common/spi/esp32-s3-ard.yaml
<<: !include common.yaml
http_request:
display:
- platform: ili9xxx
spi_id: spi_bus
id: main_lcd
model: ili9342
cs_pin: 20
dc_pin: 13
reset_pin: 21
invert_colors: true
lambda: |-
it.fill(Color(0, 0, 0));
it.image(0, 0, id(online_rgba_image));
@@ -0,0 +1,19 @@
packages:
spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml
<<: !include common.yaml
http_request:
display:
- platform: ili9xxx
spi_id: spi_bus
id: main_lcd
model: ili9342
cs_pin: 20
dc_pin: 13
reset_pin: 21
invert_colors: true
lambda: |-
it.fill(Color(0, 0, 0));
it.image(0, 0, id(online_rgba_image));