A feature complete driver for the ISL1208 real time clock from Intersil.

Dependents:   ISL1208_HelloWorld

Files at this revision

API Documentation at this revision

Comitter:
neilt6
Date:
Thu Nov 07 18:21:19 2013 +0000
Parent:
2:f33dbb2535a3
Child:
4:42dc07f9ffb3
Commit message:
Updated to use repeated start in read methods

Changed in this revision

ISL1208.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/ISL1208.cpp	Thu Nov 07 17:58:43 2013 +0000
+++ b/ISL1208.cpp	Thu Nov 07 18:21:19 2013 +0000
@@ -452,7 +452,7 @@
 char ISL1208::read8(char reg)
 {
     //Select the register
-    m_I2C.write(m_ADDR, &reg, 1);
+    m_I2C.write(m_ADDR, &reg, 1, true);
 
     //Read the 8-bit register
     m_I2C.read(m_ADDR, &reg, 1);
@@ -480,7 +480,7 @@
     char buff[2];
 
     //Select the register
-    m_I2C.write(m_ADDR, &reg, 1);
+    m_I2C.write(m_ADDR, &reg, 1, true);
 
     //Read the 16-bit register
     m_I2C.read(m_ADDR, buff, 2);