Interface to access to Avago ADNS-9500 laser mouse sensors.

Dependencies:   mbed

Revision:
14:dc9badf3c6e9
Parent:
13:6d0642367fc1
Child:
15:096f5e07d159
--- a/adns9500.cpp	Tue Oct 16 16:59:53 2012 +0000
+++ b/adns9500.cpp	Wed Oct 17 12:27:40 2012 +0000
@@ -212,7 +212,7 @@
             error("ADNS9500::sromDownload : file %s could not be opened\n", filename);
 
         unsigned int byte;
-        while (fscanf(fp, "%2x", &byte)) {
+        while (fscanf(fp, "%2x", &byte) == 1) {
             WAIT_TLOAD();
             spi_.write(byte);
         }