1# Copyright (c) 2018-2019 STMicroelectronics 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig LIS2MDL 5 bool "LIS2MDL Magnetometer" 6 default y 7 depends on DT_HAS_ST_LIS2MDL_ENABLED 8 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2MDL),i2c) 9 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2MDL),spi) 10 select HAS_STMEMSC 11 select USE_STDC_LIS2MDL 12 help 13 Enable driver for LIS2MDL I2C-based magnetometer sensor. 14 15if LIS2MDL 16 17choice LIS2MDL_TRIGGER_MODE 18 prompt "Trigger mode" 19 default LIS2MDL_TRIGGER_GLOBAL_THREAD 20 help 21 Specify the type of triggering to be used by the driver. 22 23config LIS2MDL_TRIGGER_NONE 24 bool "No trigger" 25 26config LIS2MDL_TRIGGER_GLOBAL_THREAD 27 bool "Use global thread" 28 depends on GPIO 29 select LIS2MDL_TRIGGER 30 31config LIS2MDL_TRIGGER_OWN_THREAD 32 bool "Use own thread" 33 depends on GPIO 34 select LIS2MDL_TRIGGER 35 36endchoice # LIS2MDL_TRIGGER_MODE 37 38config LIS2MDL_TRIGGER 39 bool 40 41config LIS2MDL_THREAD_PRIORITY 42 int "Thread priority" 43 depends on LIS2MDL_TRIGGER_OWN_THREAD 44 default 10 45 help 46 Priority of thread used by the driver to handle interrupts. 47 48config LIS2MDL_THREAD_STACK_SIZE 49 int "Thread stack size" 50 depends on LIS2MDL_TRIGGER_OWN_THREAD 51 default 1024 52 help 53 Stack size of thread used by the driver to handle interrupts. 54 55config LIS2MDL_MAG_ODR_RUNTIME 56 bool "Set magnetometer sampling frequency (ODR) at runtime (default: 10 Hz)" 57 default y 58 59endif # LIS2MDL 60