Rev 261 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef __MK3MAG_H
#define __MK3MAG_H
typedef struct
{
u8 Major;
u8 Minor;
u8 Patch;
u8 Compatible;
} __attribute__((packed)) MK3MAG_Version_t;
typedef struct
{
u8 CalByte;
u8 Dummy1;
u8 Dummy2;
} __attribute__((packed)) MK3MAG_Cal_t;
extern volatile MK3MAG_Version_t MK3MAG_Version;
#define MK3MAG_CMD_VERSION 0x01
#define MK3MAG_CMD_READ_MAGVECT 0x02
#define MK3MAG_CMD_READ_HEADING 0x03
#define MK3MAG_CMD_WRITE_CAL 0x04
u8 MK3MAG_Init(void);
void MK3MAG_SendCommand(u8 command);
void MK3MAG_UpdateCompass(void);
#endif // __MK3MAG_H