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

Dependencies:   mbed

Revision:
3:898ed1944119
Parent:
2:ee0c13ef1320
Child:
7:1771f1c89df6
--- a/adns9500.hpp	Thu Mar 22 15:04:33 2012 +0000
+++ b/adns9500.hpp	Thu Mar 22 17:36:49 2012 +0000
@@ -31,6 +31,7 @@
 #define ADNS9500_IF_MOTION(x)               (bool)(x & 0x80)
 #define ADNS9500_IF_LASER_FAULT(x)          (bool)(x & 0x40)
 #define ADNS9500_IF_RUNNING_SROM_CODE(x)    (bool)(x & 0x80)
+#define ADNS9500_IF_FRAME_FIRST_PIXEL(x)    (bool)(x & 0x01)
 #define ADNS9500_IF_OBSERVATION_TEST(x)     (bool)(x & ADNS9500_OBSERVATION_CHECK_BITS)
 #define ADNS9500_UINT16(ub, lb)             (((uint16_t)ub << 8) + (uint16_t)lb)
 #define ADNS9500_INT16(ub, lb)              ((((int16_t)(int8_t)ub) << 8) + (int16_t)lb)
@@ -84,7 +85,7 @@
         POWER_UP_RESET     = 0x3a,
         MOTION_BURST       = 0x50,
         SROM_LOAD_BURST    = 0x62,
-        PIXEL_BURST        = 0x62
+        PIXEL_BURST        = 0x64
     };
 
     //
@@ -259,9 +260,9 @@
             // This disables navigation and overwrites any donwloaded firmware,
             // so call to reset() is needed to restore them
             //
-            // @param pixels The array where pixel values will be stored
+            // @param pixels A pointer to the array where pixel values will be stored
             //
-            void captureFrame(uint8_t pixels[NUMBER_OF_PIXELS_PER_FRAME]);
+            void captureFrame(uint8_t* pixels);
 
             //
             // Member function invoked when motion has ocurred and if a motion pin