SAIT ARIS / Custom_LSM303

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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers lsm303.cpp Source File

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 }