summaryrefslogtreecommitdiff
path: root/drivers/avr/i2c_slave.c
diff options
context:
space:
mode:
authorJames Churchill <pelrun@gmail.com>2019-03-13 03:23:28 +1000
committerDrashna Jaelre <drashna@live.com>2019-03-12 10:23:28 -0700
commit37932c293c15011f883a91e91ee02631ead44a2e (patch)
treef1b4b3b44f816240b06580658b42b3646f121025 /drivers/avr/i2c_slave.c
parent25bb059e4e42ed2637202230ff3d8b765e1295cd (diff)
downloadqmk_firmware-37932c293c15011f883a91e91ee02631ead44a2e.tar.gz
qmk_firmware-37932c293c15011f883a91e91ee02631ead44a2e.zip
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
Diffstat (limited to 'drivers/avr/i2c_slave.c')
-rwxr-xr-xdrivers/avr/i2c_slave.c2
1 files changed, 1 insertions, 1 deletions
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);
}