[rp2] Preserve RP2040_BOARD_PINS / RP2040_BASE_PINS aliases for external imports

The ``_AliasFinder`` routes legacy ``from esphome.components.rp2040 import
boards`` to the canonical rp2 module, but external custom components and
tooling (device-builder among them) also reach for the legacy symbol
names ``RP2040_BOARD_PINS`` / ``RP2040_BASE_PINS``. Expose them as
deprecation-documented aliases of ``RP2_BOARD_PINS`` / ``RP2_BASE_PINS``
so downstream board-pin lookups keep working. Scheduled for removal in
2027.7.0.
This commit is contained in:
Jesse Hills
2026-06-24 07:10:52 +12:00
parent fb8c4b23c9
commit e35c2ef66e
2 changed files with 15 additions and 1 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
# Auto-generated by generate_boards.py — do not edit manually
# To regenerate: python esphome/components/rp2040/generate_boards.py <arduino-pico-path>
# To regenerate: python esphome/components/rp2/generate_boards.py <arduino-pico-path>
# arduino-pico maps pins >= {{ cyw43_gpio_offset }} to CYW43 wireless chip GPIOs
CYW43_GPIO_OFFSET = {{ cyw43_gpio_offset }}
@@ -23,3 +23,10 @@ BOARDS = {
},
{%- endfor %}
}
# Deprecated: use RP2_BASE_PINS / RP2_BOARD_PINS instead. Kept as back-compat
# aliases so external custom components / tooling that imported the legacy
# names via the ``rp2040`` package alias keep working.
# Scheduled for removal in 2027.7.0.
RP2040_BASE_PINS = RP2_BASE_PINS
RP2040_BOARD_PINS = RP2_BOARD_PINS
+7
View File
@@ -2299,3 +2299,10 @@ BOARDS = {
"max_pin": 29,
},
}
# Deprecated: use RP2_BASE_PINS / RP2_BOARD_PINS instead. Kept as back-compat
# aliases so external custom components / tooling that imported the legacy
# names via the ``rp2040`` package alias keep working.
# Scheduled for removal in 2027.7.0.
RP2040_BASE_PINS = RP2_BASE_PINS
RP2040_BOARD_PINS = RP2_BOARD_PINS