I2CSlave test program. I2CSlave library has some improper behavior, so this program is able to watch that. The workaround for this behavior, only for NXP device, is wrote in 'I2CSlave_mod_NXP.cpp'.

Dependencies:   mbed

First, write this program to the microcontroller which you want to check. Second, send I2C data to the microcontroller from the other one. Anything is enough for the transmission data, but the data length is made 8, 9, 10 and 11 bytes and confirm each reply.

Revision:
1:bd94bb3170b6
Parent:
0:7b78d1eee006
--- a/main.cpp	Fri Apr 15 06:12:00 2016 +0000
+++ b/main.cpp	Fri Apr 15 08:16:34 2016 +0000
@@ -1,6 +1,14 @@
 #include "mbed.h"
 
+//#define I2C_SLAVE_MOD
+
+#ifdef I2C_SLAVE_MOD
+#include "I2CSlave_mod_NXP.h"
+I2CSlave_mod slave(dp5, dp27);          // sda, scl
+#else
 I2CSlave slave(dp5, dp27);              // sda, scl
+#endif
+
 Serial serial(dp16, dp15);              // tx, rx
 DigitalOut led(LED1);                  // indicator