root / branches / encoders / code / projects / libdragonfly / encoders.h @ 676
History | View | Annotate | Download (445 Bytes)
1 |
#define RIGHT 1 |
---|---|
2 |
#ifndef LEFT
|
3 |
#define LEFT 0 |
4 |
#endif
|
5 |
#ifndef LEFT
|
6 |
#define LEFT 0 |
7 |
#endif
|
8 |
#define INVALID 1024 |
9 |
#define MAGNET_FAILURE 1025 |
10 |
|
11 |
//Data invalid flags (hardware failure):
|
12 |
#define OCF _BV(4) |
13 |
#define COF _BV(3) |
14 |
|
15 |
//Data invlalid alarm (May be invalid):
|
16 |
#define LIN _BV(2) |
17 |
|
18 |
#define MagINCn _BV(1) |
19 |
#define MagDECn _BV(0) |
20 |
|
21 |
#define BUFFER_SIZE 23 |
22 |
|
23 |
void encoder_init(void); |
24 |
int encoder_read(char encoder); |
25 |
char encoder_direction(char encoder); |
26 |
|