Rev 242 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 242 | Rev 292 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef __MK3MAG_H |
1 | #ifndef __MK3MAG_H |
2 | #define __MK3MAG_H |
2 | #define __MK3MAG_H |
Line 3... | Line -... | ||
3 | - | ||
4 | typedef struct |
- | |
5 | { |
- | |
6 | u8 Major; |
- | |
7 | u8 Minor; |
- | |
8 | u8 Patch; |
- | |
9 | u8 Compatible; |
- | |
10 | } __attribute__((packed)) MK3MAG_Version_t; |
- | |
11 | - | ||
12 | typedef struct |
- | |
13 | { |
- | |
14 | u8 CalByte; |
- | |
15 | u8 Dummy1; |
- | |
16 | u8 Dummy2; |
- | |
17 | } __attribute__((packed)) MK3MAG_Cal_t; |
- | |
18 | - | ||
19 | extern volatile MK3MAG_Version_t MK3MAG_Version; |
- | |
20 | - | ||
21 | #define MK3MAG_CMD_VERSION 0x01 |
- | |
22 | #define MK3MAG_CMD_READ_MAGVECT 0x02 |
- | |
23 | #define MK3MAG_CMD_READ_HEADING 0x03 |
- | |
24 | #define MK3MAG_CMD_WRITE_CAL 0x04 |
- | |
25 | 3 | ||
26 | u8 MK3MAG_Init(void); |
- | |
27 | void MK3MAG_SendCommand(u8 command); |
4 | u8 MK3MAG_Init(void); |
Line 28... | Line 5... | ||
28 | void MK3MAG_UpdateCompass(void); |
5 | void MK3MAG_Update(void); |