+
+ /* Slave Mode */
+
+// case 0x60: /* An own SLA_W has been received. */
+// case 0x70:
+// RdIndex = 0;
+// I2C_I2CCONSET = I2CONSET_AA; /* assert ACK after SLV_W is received */
+// I2C_I2CCONCLR = I2CONCLR_SIC;
+// I2CSlaveState = I2C_WR_STARTED;
+// break;
+//
+// case 0x80: /* data receive */
+// case 0x90:
+// if ( I2CSlaveState == I2C_WR_STARTED )
+// {
+// I2CRdBuffer[RdIndex++] = I2C_I2CDAT;
+// I2C_I2CCONSET = I2CONSET_AA; /* assert ACK after data is received */
+// }
+// else
+// {
+// I2C_I2CCONCLR = I2CONCLR_AAC; /* assert NACK */
+// }
+// // ToDo: Set a flag to indicate data is ready and process it somewhere
+// I2C_I2CCONCLR = I2CONCLR_SIC;
+// break;
+//
+// case 0xA8: /* An own SLA_R has been received. */
+// case 0xB0:
+// // RdIndex = 0;
+// WrIndex = I2CRdBuffer[0]; /* The 1st byte is the index. */
+// I2C_I2CDAT = I2CRdBuffer[WrIndex+1]; /* write the same data back to master */
+// WrIndex++; /* Need to skip the index byte in RdBuffer */
+// I2C_I2CCONSET = I2CONSET_AA; /* assert ACK after SLV_R is received */
+// I2C_I2CCONCLR = I2CONCLR_SIC;
+// I2CSlaveState = I2C_RD_STARTED;
+// break;
+//
+// case 0xB8: /* Data byte has been transmitted */
+// case 0xC8:
+// if ( I2CSlaveState == I2C_RD_STARTED )
+// {
+// I2C_I2CDAT = I2CRdBuffer[WrIndex+1]; /* write the same data back to master */
+// WrIndex++; /* Need to skip the index byte in RdBuffer */
+// I2C_I2CCONSET = I2CONSET_AA; /* assert ACK */
+// }
+// else
+// {
+// I2C_I2CCONCLR = I2CONCLR_AAC; /* assert NACK */
+// }
+// I2C_I2CCONCLR = I2CONCLR_SIC;
+// break;
+//
+// case 0xC0: /* Data byte has been transmitted, NACK */
+// I2C_I2CCONCLR = I2CONCLR_AAC; /* assert NACK */
+// I2C_I2CCONCLR = I2CONCLR_SIC;
+// I2CSlaveState = DATA_NACK;
+// break;
+//
+// case 0xA0: /* Stop condition or repeated start has */
+// I2C_I2CCONSET = I2CONSET_AA; /* been received, assert ACK. */
+// I2C_I2CCONCLR = I2CONCLR_SIC;
+// I2CSlaveState = I2C_IDLE;
+// break;
+