Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: LRAT-example-lorawan-REFACTOR-and-CLEAN-Branch
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
Generated on Wed Jul 13 2022 18:27:55 by
1.7.2