From 4fd1ebb10593087d45d2f56f7f3d13447d24802c Mon Sep 17 00:00:00 2001 From: Kevin Townsend Date: Sun, 30 Jan 2022 10:50:32 +0100 Subject: hw/sensor: Add lsm303dlhc magnetometer device This commit adds emulation of the magnetometer on the LSM303DLHC. It allows the magnetometer's X, Y and Z outputs to be set via the mag-x, mag-y and mag-z properties, as well as the 12-bit temperature output via the temperature property. Sensor can be enabled with 'CONFIG_LSM303DLHC_MAG=y'. Signed-off-by: Kevin Townsend Message-id: 20220130095032.35392-1-kevin.townsend@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/sensor/meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/sensor/meson.build') diff --git a/hw/sensor/meson.build b/hw/sensor/meson.build index 059c4ca935..d1bba290da 100644 --- a/hw/sensor/meson.build +++ b/hw/sensor/meson.build @@ -4,3 +4,4 @@ softmmu_ss.add(when: 'CONFIG_DPS310', if_true: files('dps310.c')) softmmu_ss.add(when: 'CONFIG_EMC141X', if_true: files('emc141x.c')) softmmu_ss.add(when: 'CONFIG_ADM1272', if_true: files('adm1272.c')) softmmu_ss.add(when: 'CONFIG_MAX34451', if_true: files('max34451.c')) +softmmu_ss.add(when: 'CONFIG_LSM303DLHC_MAG', if_true: files('lsm303dlhc_mag.c')) -- cgit 1.4.1