Class for representing and controlling entire I2C transactions (the master side). This class allows one to separate in code the configuration of I2C transactions from their use. This property simplifies the process of executing transactions in, for example, the body of a real-time control loop.

Files at this revision

API Documentation at this revision

Comitter:
symbiotic
Date:
Sat Dec 20 15:41:21 2014 +0000
Parent:
7:61e9a1da1f20
Commit message:
Added Transaction reset support

Changed in this revision

I2CTransaction.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/I2CTransaction.cpp	Tue Aug 05 21:54:32 2014 +0000
+++ b/I2CTransaction.cpp	Sat Dec 20 15:41:21 2014 +0000
@@ -224,6 +224,8 @@
 void I2CTransaction::resetBus()
 {
     i2c->stop();
+    i2c->start();
+    i2c->stop();
 }
 
 void I2CTransaction::cycleBus()