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
lsm303.h
00001 #ifndef LSM303_H_ 00002 #define LSM303_H_ 00003 00004 #include "mbed.h" 00005 #include "Custom_LSM303/accelerometer.h" 00006 #include "Custom_LSM303/magnometer.h" 00007 00008 /* 00009 * Custom LSM303 library used into interact with the 00010 * LSM303 E-Compass module (specifically the Accelerometer and Magonmeter) 00011 * on the LRAT and Disco Prototype Board 00012 */ 00013 00014 class LSM303 00015 { 00016 public: 00017 00018 /** 00019 */ 00020 LSM303(); 00021 00022 /** 00023 */ 00024 LSM303(I2C *_i2c, char *_buf); 00025 00026 /** 00027 */ 00028 virtual ~LSM303(); 00029 00030 /** 00031 */ 00032 void setI2C(I2C *_i2c); 00033 00034 /** 00035 */ 00036 void setBuffer(char *_buf); 00037 00038 /** 00039 */ 00040 void init(); 00041 00042 /** 00043 */ 00044 static Accelerometer accel; 00045 static Magnometer magnom; 00046 00047 /** 00048 */ 00049 char *buf; 00050 00051 private: 00052 00053 /** 00054 */ 00055 I2C *i2c; 00056 }; 00057 00058 #endif
Generated on Wed Jul 13 2022 18:27:55 by
1.7.2