/branches/v0.60_MicroMag3_Nick666/v0.66c/compass.h |
---|
0,0 → 1,46 |
struct MM3_working_struct |
{ |
uint8_t STATE; |
unsigned int DRDY; |
uint8_t AXIS; |
signed int x_axis; |
signed int y_axis; |
signed int z_axis; |
signed int NickGrad; |
signed int RollGrad; |
}; |
struct MM3_calib_struct |
{ |
int8_t X_off; |
int8_t Y_off; |
int8_t Z_off; |
uint16_t X_range; |
uint16_t Y_range; |
uint16_t Z_range; |
}; |
extern struct MM3_working_struct MM3; |
extern struct MM3_calib_struct MM3_calib; |
void init_MM3(void); |
void timer0_MM3(void); |
void calib_MM3(void); |
signed int heading_MM3(void); |
#define Max_Axis_Value 500 |
// Die Werte der Statemachine |
#define MM3_RESET 0 |
#define MM3_START_TRANSFER 1 |
#define MM3_WAIT_DRDY 2 |
#define MM3_DRDY 3 |
#define MM3_BYTE2 4 |
#define MM3_X 5 |
#define MM3_Y 6 |
#define MM3_Z 7 |
#define MM3_TILT 8 |
#define MM3_IDLE 9 |