Added support for General Call Address mode.

pull/1297/head
vimalrajr 2015-08-11 10:30:01 +05:30 committed by Karthik Purushothaman
parent 079b7cd697
commit c63497a363
1 changed files with 7 additions and 2 deletions

View File

@ -670,11 +670,16 @@ int i2c_slave_receive(i2c_t *obj)
if (i2c_module->STATUS.reg & SERCOM_I2CS_STATUS_DIR) {
/* Slave is read addressed */
return 1;
} else {
if (!(i2c_module->DATA.reg & 0xFF)) {
/* General call address detected */
return 2;
} else {
/* Slave is write addressed */
return 3;
}
}
}
return 0;
}