mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-29 14:15:33 +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:
		| @@ -33,8 +33,8 @@ using namespace upm; | ||||
| using namespace std; | ||||
|  | ||||
|  | ||||
| LSM9DS0::LSM9DS0(int bus, uint8_t gAddress, uint8_t xmAddress) : | ||||
|   m_i2cG(bus), m_i2cXM(bus), m_gpioG_INT(0), m_gpioG_DRDY(0), | ||||
| LSM9DS0::LSM9DS0(int bus, bool raw, uint8_t gAddress, uint8_t xmAddress) : | ||||
|   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_gAddr = gAddress; | ||||
|   | ||||
| @@ -1058,9 +1058,12 @@ namespace upm { | ||||
|      * lsm9ds0 constructor | ||||
|      * | ||||
|      * @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 | ||||
|      */ | ||||
|     LSM9DS0(int bus=LSM9DS0_I2C_BUS,  | ||||
|     LSM9DS0(int bus=LSM9DS0_I2C_BUS, | ||||
|             bool raw=false, | ||||
|             uint8_t gAddress=LSM9DS0_DEFAULT_GYRO_ADDR, | ||||
|             uint8_t xmAddress=LSM9DS0_DEFAULT_XM_ADDR); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Mihai Tudor Panu
					Mihai Tudor Panu