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