uint32_t pending=Chip_I2C_GetPendingInt(LPC_I2C0);
if (pending&I2C_INTSTAT_SLVDESEL) {
uint32_t monitor_read=LPC_I2C0->MONRXDAT;
Chip_I2CS_ClearStatus(LPC_I2C0,0xffffffff);
handle->callbacks->command_done(handle->buffer,!(monitor_read&I2C_MONRXDAT_MONNACK));
}
if (pending&I2C_INTSTAT_SLVPENDING) {
/*Handle normal communication, works fine*/
}
|