mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
lsm9ds0: added constructor option to allow raw i2c bus init
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
de986764d4
commit
1eafab7932
@ -33,8 +33,8 @@ using namespace upm;
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
LSM9DS0::LSM9DS0(int bus, uint8_t gAddress, uint8_t xmAddress) :
|
LSM9DS0::LSM9DS0(int bus, bool raw, uint8_t gAddress, uint8_t xmAddress) :
|
||||||
m_i2cG(bus), m_i2cXM(bus), m_gpioG_INT(0), m_gpioG_DRDY(0),
|
m_i2cG(bus, raw), m_i2cXM(bus, raw), m_gpioG_INT(0), m_gpioG_DRDY(0),
|
||||||
m_gpioXM_GEN1(0), m_gpioXM_GEN2(0)
|
m_gpioXM_GEN1(0), m_gpioXM_GEN2(0)
|
||||||
{
|
{
|
||||||
m_gAddr = gAddress;
|
m_gAddr = gAddress;
|
||||||
|
@ -1058,9 +1058,12 @@ namespace upm {
|
|||||||
* lsm9ds0 constructor
|
* lsm9ds0 constructor
|
||||||
*
|
*
|
||||||
* @param bus i2c bus to use
|
* @param bus i2c bus to use
|
||||||
|
* @param raw bypass board definition file, set to true if using Sparkfun
|
||||||
|
* 9DOF Block on an Intel Edison Arduino board
|
||||||
* @param address the address for this device
|
* @param address the address for this device
|
||||||
*/
|
*/
|
||||||
LSM9DS0(int bus=LSM9DS0_I2C_BUS,
|
LSM9DS0(int bus=LSM9DS0_I2C_BUS,
|
||||||
|
bool raw=false,
|
||||||
uint8_t gAddress=LSM9DS0_DEFAULT_GYRO_ADDR,
|
uint8_t gAddress=LSM9DS0_DEFAULT_GYRO_ADDR,
|
||||||
uint8_t xmAddress=LSM9DS0_DEFAULT_XM_ADDR);
|
uint8_t xmAddress=LSM9DS0_DEFAULT_XM_ADDR);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user