Subversion Repositories NaviCtrl

Rev

Rev 584 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 584 Rev 591
1
#ifndef __NCMAG_H
1
#ifndef __NCMAG_H
2
#define __NCMAG_H
2
#define __NCMAG_H
3
 
3
 
4
#include "compass.h" 
4
#include "compass.h" 
5
#include "i2c.h"
5
#include "i2c.h"
6
 
6
 
7
#define NCMAG_PORT_EXTERN I2C0
7
#define NCMAG_PORT_EXTERN I2C0
8
#define NCMAG_PORT_INTERN I2C1
8
#define NCMAG_PORT_INTERN I2C1
9
 
9
 
10
// supported magnetic sensor types
10
// supported magnetic sensor types
11
#define TYPE_NONE                       0
11
#define TYPE_NONE                       0
12
#define TYPE_HMC5843            1
12
#define TYPE_HMC5843            1
13
#define TYPE_LSM303DLH          2
13
#define TYPE_LSM303DLH          2
14
#define TYPE_LSM303DLM          3
14
#define TYPE_LSM303DLM          3
-
 
15
#define TYPE_LSM303D            4
15
 
16
 
16
extern u8 NCMAG_Present;
17
extern u8 NCMAG_Present;
17
extern u8 NCMAG_IsCalibrated;
18
extern u8 NCMAG_IsCalibrated;
18
extern u8 NCMAG_Orientation;
19
extern u8 NCMAG_Orientation;
19
extern u8 NCMAG_SensorType;
20
extern u8 NCMAG_SensorType;
20
 
21
 
21
u8 NCMAG_Init(void);
22
u8 NCMAG_Init(void);
22
void NCMAG_Update(u8 init);
23
void NCMAG_Update(u8 init);
23
u8 NCMAG_GetOrientationFromAcc(void);
24
u8 NCMAG_GetOrientationFromAcc(void);
24
void NCMAG_CheckOrientation(void);
25
void NCMAG_CheckOrientation(void);
25
 
26
 
26
#endif // __NCMAG_H
27
#endif // __NCMAG_H
27
 
28
 
28
 
29