Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
376 | osiair | 1 | |
2 | |||
3 | typedef struct |
||
4 | { |
||
5 | uint8_t STATE; |
||
6 | unsigned int DRDY; |
||
7 | uint8_t AXIS; |
||
8 | signed int x_axis; |
||
9 | signed int x_axis_old; |
||
10 | signed int y_axis; |
||
11 | signed int y_axis_old; |
||
12 | signed int z_axis; |
||
13 | signed int z_axis_old; |
||
14 | signed int NickGrad; |
||
15 | signed int RollGrad; |
||
16 | }MM3_struct; |
||
17 | |||
18 | extern MM3_struct MM3; |
||
19 | extern int8_t X_off, Y_off, Z_off; |
||
20 | |||
21 | void MM3_init(void); |
||
22 | void MM3_timer0(void); |
||
23 | void MM3_calib(void); |
||
24 | signed int MM3_heading(void); |
||
25 | |||
26 | #define Max_Axis_Value 500 |
||
27 | |||
28 | // Die Werte der Statemachine |
||
29 | #define MM3_RESET 0 |
||
30 | #define MM3_START_TRANSFER 1 |
||
31 | #define MM3_WAIT_DRDY 2 |
||
32 | #define MM3_DRDY 4 |
||
33 | #define MM3_BYTE2 8 |
||
34 | #define MM3_X 16 |
||
35 | #define MM3_Y 32 |
||
36 | #define MM3_Z 64 |
||
37 | #define MM3_TILT 128 |