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

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
aplatanado
Date:
Wed Jul 11 15:56:05 2012 +0000
Parent:
9:8b1e889e94fe
Child:
11:07a39997a421
Commit message:
spi_frequency was not setted in constructor

Changed in this revision

adns9500.cpp Show annotated file Show diff for this revision Revisions of this file
adns9500.hpp Show annotated file Show diff for this revision Revisions of this file
--- a/adns9500.cpp	Wed Jul 11 13:39:21 2012 +0000
+++ b/adns9500.cpp	Wed Jul 11 15:56:05 2012 +0000
@@ -63,6 +63,7 @@
           xCpi_(DEFAULT_X_CPI), yCpi_(DEFAULT_Y_CPI)
     {
         spi_.format(SPI_BITS_PER_FRAME, SPI_MODE);
+        spi_.frequency(spi_frequency);
 
         motion_.mode(PullUp);
         motion_.fall(this, &ADNS9500::motionTrigger);
--- a/adns9500.hpp	Wed Jul 11 13:39:21 2012 +0000
+++ b/adns9500.hpp	Wed Jul 11 15:56:05 2012 +0000
@@ -39,7 +39,7 @@
 namespace adns9500
 {
     // Maximum SPI clock frequency supported by the sensor
-    const int MAX_SPI_FREQUENCY = 200;
+    const int MAX_SPI_FREQUENCY = 2000000;
     
     // Internal oscillator norminal frequency
     const int INTERNAL_OSCILLATOR_FREQUENCY = 47000000;