BMG160: Add string based cons for 3-axis Gyroscope

Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Adelin Dobre
2018-07-17 14:42:58 +03:00
committed by Mihai Tudor Panu
parent 40f6bd9c6c
commit 9f545f10af
3 changed files with 168 additions and 2 deletions

View File

@@ -29,6 +29,7 @@
#include <vector>
#include <mraa/gpio.hpp>
#include <mraa/initio.hpp>
#include "bmg160.h"
#include <interfaces/iGyroscope.hpp>
@@ -94,6 +95,13 @@ namespace upm {
BMG160(int bus=BMG160_DEFAULT_I2C_BUS, int addr=BMG160_DEFAULT_ADDR,
int cs=-1);
/**
* Instantiates BMG160 3-axis Gyroscope based on a given string.
*
* @param initStr string containing specific information for BMG160 initialization.
*/
BMG160(std::string initStr);
/**
* BMG160 Destructor.
*/
@@ -472,6 +480,7 @@ namespace upm {
protected:
bmg160_context m_bmg160;
mraa::MraaIo mraaIo;
private:
/* Disable implicit copy and assignment operators */