104 lines
2.4 KiB
Plaintext
104 lines
2.4 KiB
Plaintext
# Kconfig - FXOS8700 6-axis accelerometer/magnetometer
|
|
#
|
|
# Copyright (c) 2016 Freescale Semiconductor, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
menuconfig FXOS8700
|
|
bool "FXOS8700 accelerometer/magnetometer driver"
|
|
depends on SENSOR && I2C
|
|
default n
|
|
help
|
|
Enable driver for the FXOS8700 accelerometer/magnetometer
|
|
|
|
config FXOS8700_SYS_LOG_LEVEL
|
|
int "Log level"
|
|
depends on SYS_LOG && FXOS8700
|
|
default 0
|
|
range 0 4
|
|
help
|
|
Sets log level for FXOS8700 driver.
|
|
Levels are:
|
|
|
|
- 0 OFF: do not write
|
|
|
|
- 1 ERROR: only write SYS_LOG_ERR
|
|
|
|
- 2 WARNING: write SYS_LOG_WRN in addition to previous level
|
|
|
|
- 3 INFO: write SYS_LOG_INF in addition to previous levels
|
|
|
|
- 4 DEBUG: write SYS_LOG_DBG in addition to previous levels
|
|
|
|
config FXOS8700_NAME
|
|
string "Device name"
|
|
depends on FXOS8700
|
|
default "FXOS8700"
|
|
|
|
config FXOS8700_I2C_NAME
|
|
string "I2C device name"
|
|
depends on FXOS8700
|
|
default I2C_0_NAME
|
|
|
|
config FXOS8700_I2C_ADDRESS
|
|
hex "I2C address"
|
|
depends on FXOS8700
|
|
range 0x1c 0x1f
|
|
default 0x1d
|
|
help
|
|
The I2C slave address can be configured by the SA0 and SA1 input pins.
|
|
This option should usually be set by the board defconfig.
|
|
|
|
config FXOS8700_WHOAMI
|
|
hex "WHOAMI value"
|
|
depends on FXOS8700
|
|
range 0x00 0xff
|
|
default 0xc7
|
|
help
|
|
The datasheet defines the value of the WHOAMI register, but some
|
|
pre-production devices can have a different value. It is unlikely you
|
|
should need to change this configuration option from the default.
|
|
|
|
choice
|
|
prompt "Mode"
|
|
depends on FXOS8700
|
|
default FXOS8700_MODE_ACCEL
|
|
|
|
config FXOS8700_MODE_ACCEL
|
|
bool "Accelerometer-only mode"
|
|
|
|
config FXOS8700_MODE_MAGN
|
|
bool "Magnetometer-only mode"
|
|
|
|
config FXOS8700_MODE_HYBRID
|
|
bool "Hybrid (accel+mag) mode"
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Range"
|
|
depends on FXOS8700
|
|
default FXOS8700_RANGE_8G
|
|
|
|
config FXOS8700_RANGE_8G
|
|
bool "8g (0.976 mg/LSB)"
|
|
|
|
config FXOS8700_RANGE_4G
|
|
bool "4g (0.488 mg/LSB)"
|
|
|
|
config FXOS8700_RANGE_2G
|
|
bool "2g (0.244 mg/LSB)"
|
|
|
|
endchoice
|