Subversion Repositories NaviCtrl

Rev

Rev 489 | 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
15
 
426 holgerb 16
extern u8 NCMAG_Present;
17
extern u8 NCMAG_IsCalibrated;
489 killagreg 18
extern u8 NCMAG_Orientation;
584 holgerb 19
extern u8 NCMAG_SensorType;
242 killagreg 20
 
489 killagreg 21
u8 NCMAG_Init(void);
22
void NCMAG_Update(u8 init);
23
u8 NCMAG_GetOrientationFromAcc(void);
24
void NCMAG_CheckOrientation(void);
473 holgerb 25
 
253 killagreg 26
#endif // __NCMAG_H
242 killagreg 27