Skip to content

Commit 83e065d

Browse files
committed
Fixed missing mask register setting for I2C
1 parent e85d048 commit 83e065d

File tree

1 file changed

+2
-0
lines changed
  • libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX

1 file changed

+2
-0
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX/i2c_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,5 +383,7 @@ void i2c_slave_address(i2c_t *obj, int idx, uint32_t address, uint32_t mask) {
383383
if ((idx >= 0) && (idx <= 3)) {
384384
addr = ((uint32_t)obj->i2c) + I2C_addr_offset[0][idx];
385385
*((uint32_t *) addr) = address & 0xFF;
386+
addr = ((uint32_t)obj->i2c) + I2C_addr_offset[1][idx];
387+
*((uint32_t *) addr) = mask & 0xFE;
386388
}
387389
}

0 commit comments

Comments
 (0)