2016-06-08 20:59:31 +08:00
|
|
|
# Copyright (c) 2016 Intel Corporation
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-06-08 20:59:31 +08:00
|
|
|
|
|
|
|
menuconfig HMC5883L
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "HMC5883L magnetometer"
|
2017-09-22 02:28:16 +08:00
|
|
|
depends on I2C
|
2016-06-08 20:59:31 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable driver for HMC5883L I2C-based magnetometer.
|
2016-06-08 20:59:31 +08:00
|
|
|
|
2018-09-13 06:23:26 +08:00
|
|
|
if HMC5883L
|
|
|
|
|
2016-06-08 20:59:31 +08:00
|
|
|
choice
|
|
|
|
prompt "Trigger mode"
|
2016-11-10 23:05:53 +08:00
|
|
|
default HMC5883L_TRIGGER_GLOBAL_THREAD
|
2016-06-08 20:59:31 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Specify the type of triggering to be used by the driver.
|
2016-06-08 20:59:31 +08:00
|
|
|
|
|
|
|
config HMC5883L_TRIGGER_NONE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "No trigger"
|
2016-06-08 20:59:31 +08:00
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config HMC5883L_TRIGGER_GLOBAL_THREAD
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use global thread"
|
2016-11-05 03:47:32 +08:00
|
|
|
depends on GPIO
|
2016-06-08 20:59:31 +08:00
|
|
|
select HMC5883L_TRIGGER
|
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config HMC5883L_TRIGGER_OWN_THREAD
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use own thread"
|
2016-06-08 20:59:31 +08:00
|
|
|
depends on GPIO
|
|
|
|
select HMC5883L_TRIGGER
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config HMC5883L_TRIGGER
|
|
|
|
bool
|
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config HMC5883L_THREAD_PRIORITY
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Thread priority"
|
2018-09-13 06:23:26 +08:00
|
|
|
depends on HMC5883L_TRIGGER_OWN_THREAD
|
2016-06-08 20:59:31 +08:00
|
|
|
default 10
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Priority of thread used by the driver to handle interrupts.
|
2016-06-08 20:59:31 +08:00
|
|
|
|
2016-11-10 23:05:53 +08:00
|
|
|
config HMC5883L_THREAD_STACK_SIZE
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Thread stack size"
|
2018-09-13 06:23:26 +08:00
|
|
|
depends on HMC5883L_TRIGGER_OWN_THREAD
|
2016-06-08 20:59:31 +08:00
|
|
|
default 1024
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Stack size of thread used by the driver to handle interrupts.
|
2016-06-08 20:59:31 +08:00
|
|
|
|
|
|
|
config HMC5883L_ODR
|
2018-08-14 22:19:20 +08:00
|
|
|
string "Output data rate"
|
2016-06-08 20:59:31 +08:00
|
|
|
default "15"
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Magnetometer output data rate expressed in samples per second.
|
|
|
|
Data rates supported by the chip are 0.75, 1.5, 3, 7.5, 15, 30
|
|
|
|
and 75.
|
2016-06-08 20:59:31 +08:00
|
|
|
|
|
|
|
config HMC5883L_FS
|
2018-08-14 22:19:20 +08:00
|
|
|
string "Full-scale range"
|
2016-06-08 20:59:31 +08:00
|
|
|
default "1.3"
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Magnetometer full-scale range.
|
|
|
|
An X value for the config represents a range of +/- X gauss. Valid
|
|
|
|
values are 0.88, 1.3, 1.9, 2.5, 4, 4.7, 5.6 and 8.1.
|
2018-09-13 06:23:26 +08:00
|
|
|
|
|
|
|
endif # HMC5883L
|