From 1952c1880bd67533b63131eccc2cf78d749a3588 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 13 Dec 2022 13:44:52 +1300 Subject: [PATCH] Remove internal pin restriction from cd74hc4067 (#4179) --- esphome/components/cd74hc4067/__init__.py | 8 ++++---- esphome/components/cd74hc4067/cd74hc4067.h | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/esphome/components/cd74hc4067/__init__.py b/esphome/components/cd74hc4067/__init__.py index 4fb15d1bf3..d57061b710 100644 --- a/esphome/components/cd74hc4067/__init__.py +++ b/esphome/components/cd74hc4067/__init__.py @@ -27,10 +27,10 @@ DEFAULT_DELAY = "2ms" CONFIG_SCHEMA = cv.Schema( { cv.GenerateID(): cv.declare_id(CD74HC4067Component), - cv.Required(CONF_PIN_S0): pins.internal_gpio_output_pin_schema, - cv.Required(CONF_PIN_S1): pins.internal_gpio_output_pin_schema, - cv.Required(CONF_PIN_S2): pins.internal_gpio_output_pin_schema, - cv.Required(CONF_PIN_S3): pins.internal_gpio_output_pin_schema, + cv.Required(CONF_PIN_S0): pins.gpio_output_pin_schema, + cv.Required(CONF_PIN_S1): pins.gpio_output_pin_schema, + cv.Required(CONF_PIN_S2): pins.gpio_output_pin_schema, + cv.Required(CONF_PIN_S3): pins.gpio_output_pin_schema, cv.Optional( CONF_DELAY, default=DEFAULT_DELAY ): cv.positive_time_period_milliseconds, diff --git a/esphome/components/cd74hc4067/cd74hc4067.h b/esphome/components/cd74hc4067/cd74hc4067.h index 4a5c2e4e35..6193513575 100644 --- a/esphome/components/cd74hc4067/cd74hc4067.h +++ b/esphome/components/cd74hc4067/cd74hc4067.h @@ -19,22 +19,22 @@ class CD74HC4067Component : public Component { void activate_pin(uint8_t pin); /// set the pin connected to multiplexer control pin 0 - void set_pin_s0(InternalGPIOPin *pin) { this->pin_s0_ = pin; } + void set_pin_s0(GPIOPin *pin) { this->pin_s0_ = pin; } /// set the pin connected to multiplexer control pin 1 - void set_pin_s1(InternalGPIOPin *pin) { this->pin_s1_ = pin; } + void set_pin_s1(GPIOPin *pin) { this->pin_s1_ = pin; } /// set the pin connected to multiplexer control pin 2 - void set_pin_s2(InternalGPIOPin *pin) { this->pin_s2_ = pin; } + void set_pin_s2(GPIOPin *pin) { this->pin_s2_ = pin; } /// set the pin connected to multiplexer control pin 3 - void set_pin_s3(InternalGPIOPin *pin) { this->pin_s3_ = pin; } + void set_pin_s3(GPIOPin *pin) { this->pin_s3_ = pin; } /// set the delay needed after an input switch void set_switch_delay(uint32_t switch_delay) { this->switch_delay_ = switch_delay; } private: - InternalGPIOPin *pin_s0_; - InternalGPIOPin *pin_s1_; - InternalGPIOPin *pin_s2_; - InternalGPIOPin *pin_s3_; + GPIOPin *pin_s0_; + GPIOPin *pin_s1_; + GPIOPin *pin_s2_; + GPIOPin *pin_s3_; /// the currently active pin uint8_t active_pin_; uint32_t switch_delay_;