mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Merge branch 'optimize_pcf8574' into integration
This commit is contained in:
		| @@ -99,6 +99,9 @@ bool PCF8574Component::write_gpio_() { | ||||
| } | ||||
| float PCF8574Component::get_setup_priority() const { return setup_priority::IO; } | ||||
|  | ||||
| // Run our loop() method early to invalidate cache before any other components access the pins | ||||
| float PCF8574Component::get_loop_priority() const { return 9.0f; }  // Just after WIFI | ||||
|  | ||||
| void PCF8574GPIOPin::setup() { pin_mode(flags_); } | ||||
| void PCF8574GPIOPin::pin_mode(gpio::Flags flags) { this->parent_->pin_mode(this->pin_, flags); } | ||||
| bool PCF8574GPIOPin::digital_read() { return this->parent_->digital_read(this->pin_) != this->inverted_; } | ||||
|   | ||||
| @@ -25,6 +25,7 @@ class PCF8574Component : public Component, public i2c::I2CDevice { | ||||
|   void pin_mode(uint8_t pin, gpio::Flags flags); | ||||
|  | ||||
|   float get_setup_priority() const override; | ||||
|   float get_loop_priority() const override; | ||||
|  | ||||
|   void dump_config() override; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user