First release of a Software I2C implementation, Tested and confirmed to work with the BMP085 Barometric Pressure Sensor

Fork of SoftwareI2C by Chris Pepper

Files at this revision

API Documentation at this revision

Comitter:
maruta
Date:
Fri May 15 07:21:42 2015 +0000
Parent:
2:8670e78c4b63
Commit message:
initial commit;

Changed in this revision

SoftwareI2C.h Show annotated file Show diff for this revision Revisions of this file
diff -r 8670e78c4b63 -r adc1a829ed60 SoftwareI2C.h
--- a/SoftwareI2C.h	Sun Apr 01 22:52:47 2012 +0000
+++ b/SoftwareI2C.h	Fri May 15 07:21:42 2015 +0000
@@ -126,10 +126,12 @@
         _sda.input();
         _sda.mode(OpenDrain);
         wait_us(_frequency_delay);
+        if(_sda != 0){
+            _scl = 0;
+            return false;
+        }
         _scl = 0;
 
-        if(_sda != 0){return false;}
-
         wait_us(_frequency_delay);
         return true;
     }