Subversion Repositories NaviCtrl

Rev

Rev 591 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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