Interface to access to Avago ADNS-9500 laser mouse sensors.
Fork of ADNS9500 by
Diff: adns9500.cpp
- Revision:
- 8:97e5df54b8bb
- Parent:
- 3:898ed1944119
- Child:
- 9:8b1e889e94fe
--- a/adns9500.cpp Mon Jun 25 16:33:14 2012 +0000 +++ b/adns9500.cpp Tue Jul 10 13:29:45 2012 +0000 @@ -88,13 +88,19 @@ // clear observation register. Only required to deassert shutdown mode. spiSend(OBSERVATION, 0x00); LONG_WAIT_US(DEFAULT_MAX_FRAME_PERIOD); - + + WAIT_TSCLKNCS(); + ncs_.write(1); + // check observation register bits [5:0] int observation = spiReceive(OBSERVATION); if (! ADNS9500_IF_OBSERVATION_TEST(observation)) error("ADNS9500::reset : observation register test failed: 0x%x\n", observation); // read motion data + ncs_.write(0); + WAIT_TNCSSCLK(); + WAIT_TSRR(); spiReceive(MOTION); WAIT_TSRR();