mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-26 12:43:48 +00:00 
			
		
		
		
	Fix mcp23s17 addressing beyond 3 (#3797)
This commit is contained in:
		| @@ -23,6 +23,13 @@ void MCP23S17::setup() { | ||||
|   this->transfer_byte(0b00011000);  // Enable HAEN pins for addressing | ||||
|   this->disable(); | ||||
|  | ||||
|   this->enable(); | ||||
|   cmd = 0b01001000; | ||||
|   this->transfer_byte(cmd); | ||||
|   this->transfer_byte(mcp23x17_base::MCP23X17_IOCONA); | ||||
|   this->transfer_byte(0b00011000);  // Enable HAEN pins for addressing | ||||
|   this->disable(); | ||||
|  | ||||
|   // Read current output register state | ||||
|   this->read_reg(mcp23x17_base::MCP23X17_OLATA, &this->olat_a_); | ||||
|   this->read_reg(mcp23x17_base::MCP23X17_OLATB, &this->olat_b_); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user