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.
Diff: I2CTransaction.cpp
- Revision:
- 1:5d9e9c0682f0
- Parent:
- 0:96a7926b9d64
- Child:
- 3:a9d61e73fe97
--- a/I2CTransaction.cpp Wed May 21 21:12:32 2014 +0000 +++ b/I2CTransaction.cpp Wed May 21 21:37:49 2014 +0000 @@ -23,7 +23,7 @@ - 88: read ACK */ -// Initialization of static member (kind of gross to do it this way) +// Initialization of static member (kind of gross to do it this way - need to find another solution) //MODI2C* I2CTransaction::i2c = new MODI2C(p9, p10); MODI2C* I2CTransaction::i2c = new MODI2C(p28, p27); @@ -165,10 +165,11 @@ @return true if error, false if not */ - +/* bool I2CTransaction::error() { // Write transaction has completed with an error code (can't be 0 (in progress) or 40 (correct)) // Read transaction, if it exists, has completed with an error code (can't be 0 (in progress) or 88 (correct)) return (status[0] != 0 && status[0] != 40) || (readPacket != NULL && status[1] != 0 && status[1] != 88); -} \ No newline at end of file +} +*/