Blame |
Last modification |
View Log
| RSS feed
typedef struct
{
unsigned char STATE;
unsigned int DRDY;
unsigned char AXIS;
signed int x_axis;
signed int y_axis;
signed int z_axis;
}MM3_struct;
extern MM3_struct MM3;
void init_spi(void);
void MM3_timer0(void);
#define MM3_RESET 0
#define MM3_START_TRANSFER 1
#define MM3_WAIT_DRDY 2
#define MM3_DRDY 3
#define MM3_X_BYTE2 4
#define MM3_Y_BYTE2 5
#define MM3_Z_BYTE2 6
#define MM3_X 7
#define MM3_Y 8
#define MM3_Z 9
#define MM3_IDLE 255
#define PS2 6
#define PS1 5
#define PS0 5
#define AS1 1
#define AS0 0