Rev 438 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 438 | Rev 466 | ||
---|---|---|---|
1 | 1 | ||
2 | 2 | ||
3 | struct MM3_working_struct |
3 | struct MM3_working_struct |
4 | { |
4 | { |
5 | uint8_t STATE; |
5 | uint8_t STATE; |
6 | unsigned int DRDY; |
6 | unsigned int DRDY; |
7 | uint8_t AXIS; |
7 | uint8_t AXIS; |
8 | signed int x_axis; |
8 | signed int x_axis; |
9 | signed int y_axis; |
9 | signed int y_axis; |
10 | signed int z_axis; |
10 | signed int z_axis; |
11 | signed int NickGrad; |
- | |
12 | signed int RollGrad; |
- | |
13 | }; |
11 | }; |
14 | 12 | ||
15 | 13 | ||
16 | struct MM3_calib_struct |
14 | struct MM3_calib_struct |
17 | { |
15 | { |
18 | int8_t X_off; |
16 | int8_t X_off; |
19 | int8_t Y_off; |
17 | int8_t Y_off; |
20 | int8_t Z_off; |
18 | int8_t Z_off; |
21 | uint16_t X_range; |
19 | uint16_t X_range; |
22 | uint16_t Y_range; |
20 | uint16_t Y_range; |
23 | uint16_t Z_range; |
21 | uint16_t Z_range; |
24 | }; |
22 | }; |
25 | 23 | ||
26 | extern struct MM3_working_struct MM3; |
24 | extern struct MM3_working_struct MM3; |
27 | extern struct MM3_calib_struct MM3_calib; |
25 | extern struct MM3_calib_struct MM3_calib; |
28 | 26 | ||
29 | void init_MM3(void); |
27 | void init_MM3(void); |
30 | void timer0_MM3(void); |
28 | void timer0_MM3(void); |
31 | void calib_MM3(void); |
29 | void calib_MM3(void); |
32 | signed int heading_MM3(void); |
30 | signed int heading_MM3(void); |
33 | 31 | ||
34 | #define Max_Axis_Value 500 |
32 | #define Max_Axis_Value 500 |
35 | 33 | ||
36 | // Die Werte der Statemachine |
34 | // Die Werte der Statemachine |
37 | #define MM3_RESET 0 |
35 | #define MM3_RESET 0 |
38 | #define MM3_START_TRANSFER 1 |
36 | #define MM3_START_TRANSFER 1 |
39 | #define MM3_WAIT_DRDY 2 |
37 | #define MM3_WAIT_DRDY 2 |
40 | #define MM3_DRDY 3 |
38 | #define MM3_DRDY 3 |
41 | #define MM3_BYTE2 4 |
39 | #define MM3_BYTE2 4 |
42 | #define MM3_X 5 |
40 | #define MM3_X 5 |
43 | #define MM3_Y 6 |
41 | #define MM3_Y 6 |
44 | #define MM3_Z 7 |
42 | #define MM3_Z 7 |
45 | #define MM3_TILT 8 |
43 | #define MM3_TILT 8 |
46 | #define MM3_IDLE 9 |
44 | #define MM3_IDLE 9 |
47 | 45 |