From 37932c293c15011f883a91e91ee02631ead44a2e Mon Sep 17 00:00:00 2001 From: James Churchill Date: Wed, 13 Mar 2019 03:23:28 +1000 Subject: Next set of split_common changes (#4974) * Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment --- drivers/avr/i2c_slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/avr/i2c_slave.c') diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c index 18a29a45a5..dbb9fb0df3 100755 --- a/drivers/avr/i2c_slave.c +++ b/drivers/avr/i2c_slave.c @@ -16,7 +16,7 @@ static volatile bool slave_has_register_set = false; void i2c_slave_init(uint8_t address){ // load address into TWI address register - TWAR = (address << 1); + TWAR = address; // set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN); } -- cgit v1.2.3