Trackball based on the NXP LPC11U24 and the ADNS-9500

Dependencies:   ADNS9500 USBDevice mbed 25LCxxx_SPI

Committer:
xxann5
Date:
Thu Dec 13 03:10:46 2012 +0000
Revision:
4:ba169f98e9be
Parent:
2:72a8d2b11320
Child:
5:c7056267daa7
Added 25LCxxx_SPI library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
xxann5 2:72a8d2b11320 1 #include "mbed.h"
xxann5 2:72a8d2b11320 2 #include "USBMouse.h"
xxann5 2:72a8d2b11320 3 #include <math.h>
xxann5 2:72a8d2b11320 4 #include <stdint.h>
xxann5 2:72a8d2b11320 5
xxann5 2:72a8d2b11320 6 #define ADNS9500_SROM_91
xxann5 2:72a8d2b11320 7
xxann5 2:72a8d2b11320 8 #define DEBUG
xxann5 2:72a8d2b11320 9
xxann5 2:72a8d2b11320 10 #include "adns9500.hpp"
xxann5 4:ba169f98e9be 11 #include "Ser25lcxxx.h"
xxann5 2:72a8d2b11320 12
xxann5 2:72a8d2b11320 13 DigitalOut led1(LED1);
xxann5 2:72a8d2b11320 14 DigitalOut led2(LED2);
xxann5 2:72a8d2b11320 15 DigitalOut led3(LED3);
xxann5 2:72a8d2b11320 16 DigitalOut led4(LED4);
xxann5 2:72a8d2b11320 17
xxann5 2:72a8d2b11320 18 InterruptIn btn_hr(p16);
xxann5 2:72a8d2b11320 19 InterruptIn btn_z(p17);
xxann5 2:72a8d2b11320 20 InterruptIn btn_l(p18);
xxann5 2:72a8d2b11320 21 InterruptIn btn_m(p19);
xxann5 2:72a8d2b11320 22 InterruptIn btn_r(p20);
xxann5 2:72a8d2b11320 23
xxann5 2:72a8d2b11320 24 bool motion_triggered = false;
xxann5 2:72a8d2b11320 25 bool z_axis_active = false;
xxann5 2:72a8d2b11320 26 bool high_rez_active = false;
xxann5 2:72a8d2b11320 27
xxann5 2:72a8d2b11320 28 int default_motion_cpi = 1080;
xxann5 2:72a8d2b11320 29 int default_z_cpi = 90;
xxann5 2:72a8d2b11320 30 int default_hirez_cpi = 180;