2020-01-31 17:39:41 +08:00
|
|
|
# Copyright (c) 2020 STMicroelectronics
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
menuconfig IIS2MDC
|
|
|
|
bool "IIS2MDC Magnetometer"
|
2020-09-18 22:21:59 +08:00
|
|
|
depends on I2C || SPI
|
2020-01-31 17:39:41 +08:00
|
|
|
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
|