Commit 93e049a6 authored by Yannis Damigos's avatar Yannis Damigos Committed by Maureen Helm
Browse files

boards/arm/stm32f3_disco: Enable LSM303DLHC MEMS sensors



Enable LSM303DLHC, ST MEMS system-in-package featuring
a 3D digital linear acceleration sensor and a 3D digital
magnetic sensor, on stm32f3_disco board.

Signed-off-by: default avatarYannis Damigos <giannis.damigos@gmail.com>
parent aad6ada1
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
/* This file is a temporary workaround for mapping of the generated information
 * to the current driver definitions.  This will be removed when the drivers
 * are modified to handle the generated information, or the mapping of
 * generated data matches the driver definitions.
 */

#define CONFIG_LSM303DLHC_ACCEL_NAME			ST_STM32_I2C_V2_40005400_ST_LSM303DLHC_ACCEL_19_LABEL
#define CONFIG_LSM303DLHC_ACCEL_I2C_ADDR		ST_STM32_I2C_V2_40005400_ST_LSM303DLHC_ACCEL_19_BASE_ADDRESS
#define CONFIG_LSM303DLHC_ACCEL_I2C_MASTER_DEV		ST_STM32_I2C_V2_40005400_ST_LSM303DLHC_ACCEL_19_BUS_NAME

#define CONFIG_LSM303DLHC_MAGN_NAME			ST_STM32_I2C_V2_40005400_ST_LSM303DLHC_MAGN_1E_LABEL
#define CONFIG_LSM303DLHC_MAGN_I2C_ADDR			ST_STM32_I2C_V2_40005400_ST_LSM303DLHC_MAGN_1E_BASE_ADDRESS
#define CONFIG_LSM303DLHC_MAGN_I2C_MASTER_DEV		ST_STM32_I2C_V2_40005400_ST_LSM303DLHC_MAGN_1E_BUS_NAME
+12 −0
Original line number Diff line number Diff line
@@ -84,6 +84,18 @@
&i2c1 {
	status = "ok";
	clock-frequency = <I2C_BITRATE_FAST>;

	lsm303dlhc-magn@1e {
		compatible = "st,lsm303dlhc-magn";
		reg = <0x1e>;
		label = "LSM303DLHC-MAGN";
	};

	lsm303dlhc-accel@19 {
		compatible = "st,lsm303dlhc-accel";
		reg = <0x19>;
		label = "LSM303DLHC-ACCEL";
	};
};

&i2c2 {