39 #define I2C_CON_FLAGS (I2C_CON_AA | I2C_CON_SI | I2C_CON_STO | I2C_CON_STA)
40 #define LPC_I2Cx(id) ((i2c[id].ip))
41 #define SLAVE_ACTIVE(iic) (((iic)->flags & 0xFF00) != 0)
132 uint32_t index = (uint32_t) sid - 1;
133 pI2C->
MASK[index] = mask;
138 volatile uint32_t *abase = &pI2C->
ADR1;
139 abase[index - 1] = addr;
147 return (addr1 & ~mask) == (addr2 & ~mask);
153 if (!(slaveAddr >> 1)) {
205 if (xfer->
rxSz > 1) {
272 if (xfer->
rxSz > 1) {
282 if (xfer->
rxSz > 1) {
294 if (xfer->
txSz > 0) {
388 LPC_I2Cx(
id)->SCLH = (uint32_t) (SCLValue >> 1);
405 return iic->
mEvent == event;
439 return (
int) xfer->
status;
450 return len - xfer.
txSz;
465 return len - xfer.
rxSz;
476 return len - xfer.
rxSz;
513 iic->
flags |= 1 << (sid + 8);