Tool to recover from an I2C bus lockup on the KL25Z

Dependents:   Ejerc_slave_I2c

This tool allows you to recover from an I2C bus lockup on I2C0 (PTE24, PTE25) and I2C1 (PTE0, PTE1).
The reset is only carried out when the corresponding I2C bus is enabled.

Add following code to your program :

#include "I2C_busreset.h"
...
...
int main (void)
{
    I2C_busreset();
    ....
Revision:
0:e9beb537cf77
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/I2C_busreset.h	Wed Feb 19 19:18:49 2014 +0000
@@ -0,0 +1,17 @@
+/**************************************************************************************************
+ *****                                                                                        *****
+ *****  Name: KL25Z I2C_busreset.h                                                            *****
+ *****  Date: 24/11/2013                                                                      *****
+ *****  Auth: Frank Vannieuwkerke                                                             *****
+ *****  Func: library for unblocking I2C bus on KL25Z board                                   *****
+ *****  Info: MPL3115A2-AN4481                                                                *****
+ **************************************************************************************************/
+
+#include "mbed.h"
+
+#ifndef KL25Z_I2C_RES_H
+#define KL25Z_I2C_RES_H
+ 
+void I2C_busreset(void);
+
+#endif