Fix I2C slave address

Remove the needless bit shift for I2C slave address.
pull/2136/head
lrks 2016-07-10 10:34:13 +09:00
parent 9e5a7794ab
commit 4b77054940
1 changed files with 1 additions and 1 deletions

View File

@ -233,7 +233,7 @@ int i2c_slave_write(i2c_t *obj, const char *data, int length) {
}
void i2c_slave_address(i2c_t *obj, int idx, uint32_t address, uint32_t mask) {
i2c_addrs[obj->instance]->A1 = ((uint32_t)(address)) << 1U;
i2c_addrs[obj->instance]->A1 = address & 0xfe;
}
#endif