Trackball based on the NXP LPC11U24 and the ADNS-9500

Dependencies:   ADNS9500 USBDevice mbed 25LCxxx_SPI

main.h

Committer:
xxann5
Date:
2012-12-13
Revision:
4:ba169f98e9be
Parent:
2:72a8d2b11320
Child:
5:c7056267daa7

File content as of revision 4:ba169f98e9be:

#include "mbed.h"
#include "USBMouse.h"
#include <math.h>
#include <stdint.h>

#define ADNS9500_SROM_91

#define DEBUG

#include "adns9500.hpp"
#include "Ser25lcxxx.h"

DigitalOut led1(LED1);
DigitalOut led2(LED2);
DigitalOut led3(LED3);
DigitalOut led4(LED4);

InterruptIn btn_hr(p16);
InterruptIn btn_z(p17);
InterruptIn btn_l(p18);
InterruptIn btn_m(p19);
InterruptIn btn_r(p20);

bool motion_triggered = false;
bool z_axis_active    = false;
bool high_rez_active  = false;

int default_motion_cpi = 1080;
int default_z_cpi      = 90;
int default_hirez_cpi  = 180;