mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 19:38:30 +02:00
Add config to allow suppression of warnings about use of strapping pins (#5287)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ from esphome.const import (
|
||||
)
|
||||
|
||||
import esphome.config_validation as cv
|
||||
from esphome.pins import check_strapping_pin
|
||||
|
||||
_ESP_32S3_SPI_PSRAM_PINS = {
|
||||
26: "SPICS1",
|
||||
@@ -45,14 +46,6 @@ def esp32_s3_validate_gpio_pin(value):
|
||||
value,
|
||||
)
|
||||
|
||||
if value in _ESP_32S3_STRAPPING_PINS:
|
||||
_LOGGER.warning(
|
||||
"GPIO%d is a Strapping PIN and should be avoided.\n"
|
||||
"Attaching external pullup/down resistors to strapping pins can cause unexpected failures.\n"
|
||||
"See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins",
|
||||
value,
|
||||
)
|
||||
|
||||
if value in (22, 23, 24, 25):
|
||||
# These pins are not exposed in GPIO mux (reason unknown)
|
||||
# but they're missing from IO_MUX list in datasheet
|
||||
@@ -71,4 +64,6 @@ def esp32_s3_validate_supports(value):
|
||||
if is_input:
|
||||
# All ESP32 pins support input mode
|
||||
pass
|
||||
|
||||
check_strapping_pin(value, _ESP_32S3_STRAPPING_PINS, _LOGGER)
|
||||
return value
|
||||
|
||||
Reference in New Issue
Block a user