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
This commit is contained in:
parent
25bb059e4e
commit
37932c293c
24 changed files with 187 additions and 614 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue