-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.h
33 lines (25 loc) · 844 Bytes
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CONFIG_H
#define CONFIG_H
// contains macros and function prototypes
// for configuration and initialization
// Values for right prescaler
#define PR1_MAP 0x5000 // Max prescaler for tracking
#define PR1_TRACK 0x0700 // CURRENT_MAX-PR1_TRACK = MAX_GAIN
#define PR1_CORRECT 2 // Incremental gain
#define PR1_INIT 0x8000 // To prevent inital drift
// Values for left prescaler
#define PR2_MAP 0x7000 // Max prescaler for tracking
#define PR2_TRACK 0x0700 // CURRENT_MAX-PR2_TRACK = MAX_GAIN
#define PR2_CORRECT 2 // Incremental gain
#define PR2_INIT 0x8000 // To prevent inital drift
// initialize the mouse
void init_all(void);
// initialize global variables
void init_globals(void);
// configure interrupts
void config_interrupts(void);
// configure clock
void init_clock(void);
// configure io
void config_io(void);
#endif