Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
366 | Nick666 | 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_working_struct; |
||
17 | |||
18 | |||
19 | typedef struct |
||
20 | { |
||
21 | int8_t X_off; |
||
22 | int8_t Y_off; |
||
23 | int8_t Z_off; |
||
24 | }MM3_calib_struct; |
||
25 | |||
26 | extern MM3_working_struct MM3; |
||
27 | extern MM3_calib_struct MM3_calib; |
||
28 | |||
371 | Nick666 | 29 | void init_MM3(void); |
30 | void timer0_MM3(void); |
||
366 | Nick666 | 31 | void calib_MM3(void); |
371 | Nick666 | 32 | signed int heading_MM3(void); |
366 | Nick666 | 33 | |
34 | #define Max_Axis_Value 500 |
||
35 | |||
36 | // Die Werte der Statemachine |
||
37 | #define MM3_RESET 0 |
||
38 | #define MM3_START_TRANSFER 1 |
||
39 | #define MM3_WAIT_DRDY 2 |
||
40 | #define MM3_DRDY 4 |
||
41 | #define MM3_BYTE2 8 |
||
42 | #define MM3_X 16 |
||
43 | #define MM3_Y 32 |
||
44 | #define MM3_Z 64 |
||
45 | #define MM3_TILT 128 |