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