Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
205 | Nick666 | 1 | |
2 | |||
3 | typedef struct |
||
4 | { |
||
226 | Nick666 | 5 | uint8_t STATE; |
205 | Nick666 | 6 | unsigned int DRDY; |
226 | Nick666 | 7 | uint8_t AXIS; |
205 | Nick666 | 8 | signed int x_axis; |
9 | signed int y_axis; |
||
10 | signed int z_axis; |
||
226 | Nick666 | 11 | signed int NickGrad; |
12 | signed int RollGrad; |
||
205 | Nick666 | 13 | }MM3_struct; |
14 | |||
15 | extern MM3_struct MM3; |
||
16 | |||
17 | void init_spi(void); |
||
18 | void MM3_timer0(void); |
||
226 | Nick666 | 19 | signed int MM3_heading(void); |
205 | Nick666 | 20 | |
226 | Nick666 | 21 | #define Int2Grad_Faktor 1024 |
22 | |||
23 | // Die Werte der Statemachine |
||
205 | Nick666 | 24 | #define MM3_RESET 0 |
25 | #define MM3_START_TRANSFER 1 |
||
26 | #define MM3_WAIT_DRDY 2 |
||
280 | Nick666 | 27 | #define MM3_DRDY 4 |
28 | #define MM3_BYTE2 8 |
||
29 | #define MM3_X 16 |
||
30 | #define MM3_Y 32 |
||
31 | #define MM3_Z 64 |
||
32 | #define MM3_TILT 128 |
||
205 | Nick666 | 33 | |
226 | Nick666 | 34 | |
35 | // Die Werte der Kompasskalibrierung |
||
233 | Nick666 | 36 | |
234 | Nick666 | 37 | // OFFSET: (Maximaler Wert + minimaler Wert) / 2 |
283 | Nick666 | 38 | #define OFF_X 0 |
39 | #define OFF_Y 0 |
||
40 | #define OFF_Z 0 |