blob: 2215c778c28850ff9e803a25b15c538a83cb957d [file] [log] [blame]
# Copyright (c) 2020 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
menuconfig IIS2MDC
bool "IIS2MDC Magnetometer"
default y
depends on DT_HAS_ST_IIS2MDC_ENABLED
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2MDC),i2c)
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2MDC),spi)
select HAS_STMEMSC
select USE_STDC_IIS2MDC
help
Enable driver for IIS2MDC I2C-based magnetometer sensor.
if IIS2MDC
choice IIS2MDC_TRIGGER_MODE
prompt "Trigger mode"
default IIS2MDC_TRIGGER_GLOBAL_THREAD
help
Specify the type of triggering to be used by the driver.
config IIS2MDC_TRIGGER_NONE
bool "No trigger"
config IIS2MDC_TRIGGER_GLOBAL_THREAD
bool "Use global thread"
depends on GPIO
select IIS2MDC_TRIGGER
config IIS2MDC_TRIGGER_OWN_THREAD
bool "Use own thread"
depends on GPIO
select IIS2MDC_TRIGGER
endchoice # IIS2MDC_TRIGGER_MODE
config IIS2MDC_TRIGGER
bool
config IIS2MDC_THREAD_PRIORITY
int "Thread priority"
depends on IIS2MDC_TRIGGER_OWN_THREAD
default 10
help
Priority of thread used by the driver to handle interrupts.
config IIS2MDC_THREAD_STACK_SIZE
int "Thread stack size"
depends on IIS2MDC_TRIGGER_OWN_THREAD
default 1024
help
Stack size of thread used by the driver to handle interrupts.
config IIS2MDC_MAG_ODR_RUNTIME
bool "Set magnetometer sampling frequency (ODR) at runtime (default: 10 Hz)"
default y
endif # IIS2MDC