Forked from Frank's excellent library and extended to include I2C0 on PTC8 & PTC9. "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."
Fork of KL25Z_I2C_busreset by
Revision 3:7584a206afd4, committed 2016-06-14
- Comitter:
- ateyercheese
- Date:
- Tue Jun 14 17:06:54 2016 +0000
- Parent:
- 2:a166055977ec
- Child:
- 5:28a540b25e1c
- Commit message:
- IfDef, that expects KL25Z to be defined if required
Changed in this revision
I2C_busreset.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/I2C_busreset.cpp Tue Feb 24 17:49:59 2015 +0000 +++ b/I2C_busreset.cpp Tue Jun 14 17:06:54 2016 +0000 @@ -6,6 +6,7 @@ ***** Func: library for unblocking I2C bus on KL25Z board ***** ***** Info: MPL3115A2-AN4481 ***** **************************************************************************************************/ +#ifdef KL25Z #include "I2C_busreset.h" @@ -85,3 +86,4 @@ I2C0->C1 |= 0x80; // Enable I2C0 bus } } +#endif \ No newline at end of file