]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/mulle/chips/rv8564/RV8564P.nc
Changed the chip wiring of the RV8564 and DS2782 chips on Mulle compatible with the...
[tinyos-2.x.git] / tos / platforms / mulle / chips / rv8564 / RV8564P.nc
index 9dcf0c2bbc47ccbb8f1778d06eab442815af9fd8..35c0c0a6471d46906b012518717eb47e1c35c2d4 100755 (executable)
@@ -136,8 +136,8 @@ implementation
       return FAIL;
     }
     state = WRITING;
-    write_buffer[0] = reg;
-    write_buffer[1] = value;
+    atomic write_buffer[0] = reg;
+    atomic write_buffer[1] = value;
     call I2CResource.request();
     return SUCCESS;
   }
@@ -147,7 +147,7 @@ implementation
     atomic {
       if (state == READING)
       {
-        call I2C.write(I2C_START, RV8564_ADDR, 1, &read_register);
+        call I2C.write(I2C_START | I2C_STOP, RV8564_ADDR, 1, &read_register);
       }
       else if (state == WRITING)
       {