mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 08:41:59 +00:00
Merge remote-tracking branch 'upstream/dev' into integration
This commit is contained in:
@@ -434,10 +434,13 @@ def _final_validate_rmii_pins(config: ConfigType) -> None:
|
||||
|
||||
# Check all used pins against RMII reserved pins
|
||||
for pin_list in pins.PIN_SCHEMA_REGISTRY.pins_used.values():
|
||||
for pin_path, _, pin_config in pin_list:
|
||||
for pin_path, pin_device, pin_config in pin_list:
|
||||
pin_num = pin_config.get(CONF_NUMBER)
|
||||
if pin_num not in rmii_pins:
|
||||
continue
|
||||
# Skip if pin is not directly on ESP, but at some expander (device set to something else than 'None')
|
||||
if pin_device is not None:
|
||||
continue
|
||||
# Found a conflict - show helpful error message
|
||||
pin_function = rmii_pins[pin_num]
|
||||
component_path = ".".join(str(p) for p in pin_path)
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
// Platform-agnostic macros for PROGMEM string handling
|
||||
// On ESP32 (both Arduino and IDF): Use plain strings (no PROGMEM)
|
||||
// On ESP8266/Arduino: Use Arduino's F() macro for PROGMEM strings
|
||||
// On other platforms: Use plain strings (no PROGMEM)
|
||||
|
||||
#ifdef USE_ESP32
|
||||
#define ESPHOME_F(string_literal) (string_literal)
|
||||
#define ESPHOME_PGM_P const char *
|
||||
#define ESPHOME_strncpy_P strncpy
|
||||
#else
|
||||
// ESP8266 and other Arduino platforms use Arduino macros
|
||||
#ifdef USE_ESP8266
|
||||
// ESP8266 uses Arduino macros
|
||||
#define ESPHOME_F(string_literal) F(string_literal)
|
||||
#define ESPHOME_PGM_P PGM_P
|
||||
#define ESPHOME_strncpy_P strncpy_P
|
||||
#else
|
||||
#define ESPHOME_F(string_literal) (string_literal)
|
||||
#define ESPHOME_PGM_P const char *
|
||||
#define ESPHOME_strncpy_P strncpy
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<<: !include common-lan8720.yaml
|
||||
|
||||
sn74hc165:
|
||||
- id: sn74hc165_hub
|
||||
clock_pin: GPIO13
|
||||
data_pin: GPIO14
|
||||
load_pin: GPIO15
|
||||
sr_count: 3
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
sn74hc165: sn74hc165_hub
|
||||
number: 19
|
||||
id: relay_2
|
||||
Reference in New Issue
Block a user