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.cpp
00001 #include "Custom_LSM303/lsm303.h" 00002 00003 /** 00004 */ 00005 LSM303::LSM303() 00006 { 00007 00008 } 00009 00010 /** 00011 */ 00012 LSM303::LSM303(I2C *_i2c, char *_buf) 00013 { 00014 i2c = _i2c; 00015 buf = _buf; 00016 } 00017 00018 /** 00019 */ 00020 LSM303::~LSM303() 00021 { 00022 00023 } 00024 00025 /** 00026 */ 00027 void LSM303::setI2C(I2C *_i2c) 00028 { 00029 i2c = _i2c; 00030 } 00031 00032 /** 00033 */ 00034 void LSM303::setBuffer(char *_buf) 00035 { 00036 buf = _buf; 00037 } 00038 00039 /** 00040 */ 00041 Accelerometer LSM303::accel; 00042 00043 /** 00044 */ 00045 Magnometer LSM303::magnom; 00046 00047 /** 00048 */ 00049 void LSM303::init() 00050 { 00051 accel.setters(i2c, buf); 00052 magnom.setters(i2c, buf); 00053 }
Generated on Wed Jul 13 2022 18:27:55 by
1.7.2