root / branches / encoders / code / projects / libdragonfly / encoders.h @ 674
History | View | Annotate | Download (421 Bytes)
1 | 674 | justin | #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 | void encoder_init(void); |
||
22 | int encoder_read(char encoder); |
||
23 | char encoder_direction(char encoder); |