SAIT ARIS / Custom_LSM303

Dependents:   LRAT-example-lorawan-REFACTOR-and-CLEAN-Branch

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers magnometer.h Source File

magnometer.h

00001 #ifndef MAGNOMETER_H_
00002 #define MAGNOMETER_H_
00003 
00004 #include "mbed.h"
00005 
00006 #define PIN_MAG 0x1C
00007 
00008 class Magnometer
00009 {
00010     public:
00011     
00012         /**
00013          */
00014         Magnometer();
00015         
00016         /**
00017          */
00018         virtual ~Magnometer();
00019         
00020         /**
00021          */
00022         void setters(I2C *_i2c, char *_buf);
00023         
00024         /**
00025          */
00026         void dumpCfg();
00027         
00028         /**
00029          */
00030         void onIRQ();
00031         
00032         /**
00033          */
00034         void wipeIRQ();
00035         
00036         /**
00037          */
00038         void init();
00039         
00040         /**
00041          */
00042         //void read();
00043         
00044         /**
00045          */
00046         char *buf;
00047         
00048     private:
00049         /**
00050          */
00051         I2C *i2c;
00052         
00053         /**
00054          */
00055         InterruptIn magPin(PIN_MAG);
00056     
00057 };
00058 
00059 #endif