Added iGyroscope interface

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Serban Waltter
2018-10-02 14:06:17 +03:00
committed by Mihai Tudor Panu
parent 34bb12933d
commit aa966946d5
39 changed files with 222 additions and 47 deletions

View File

@ -2,5 +2,5 @@ set (libname "lsm9ds0")
set (libdescription "Triaxial Gyroscope/accelerometer/magnetometer Sensor")
set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp)
set (module_iface iAcceleration.hpp)
set (module_iface iAcceleration.hpp iGyroscope.hpp)
upm_module_init(mraa)

View File

@ -31,6 +31,7 @@
#include <mraa/gpio.hpp>
#include <interfaces/iAcceleration.hpp>
#include <interfaces/iGyroscope.hpp>
#define LSM9DS0_I2C_BUS 1
#define LSM9DS0_DEFAULT_XM_ADDR 0x1d
@ -79,7 +80,7 @@ namespace upm {
* @snippet lsm9ds0.cxx Interesting
*/
class LSM9DS0: virtual public iAcceleration {
class LSM9DS0: virtual public iAcceleration, virtual public iGyroscope {
public:
// NOTE: reserved registers must not be written into or permanent
@ -1074,7 +1075,7 @@ namespace upm {
/**
* LSM9DS0 Destructor
*/
~LSM9DS0();
virtual ~LSM9DS0();
/**
* set up initial values and start operation