1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/vl6180x/Kconfig
2024-03-27 10:28:12 +01:00

170 lines
5.0 KiB
Plaintext

# Copyright (c) 2021 Gunar Schorcht
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
if USEMODULE_VL6180X
config VL6180X_RNG_MAX_TIME
int "Ranging maximum convergence time [ms]"
range 1 63
default 50
depends on USEMODULE_VL6180X_RNG
if USEMODULE_VL6180X_ALS
config VL6180X_ALS_INT_TIME
int "ALS integration time [ms]"
range 0 511
default 100
choice VL6180X_ALS_GAIN
bool "ALS analogue light channel gain"
default VL6180X_ALS_GAIN_1
config VL6180X_ALS_GAIN_1
bool "ALS gain setting 1 (actual analogue gain of 1.01)"
config VL6180X_ALS_GAIN_1_25
bool "ALS gain setting 1.25 (actual analogue gain of 1.28)"
config VL6180X_ALS_GAIN_1_67
bool "ALS gain setting 1.67 (actual analogue gain of 1.72)"
config VL6180X_ALS_GAIN_2_5
bool "ALS gain setting 2.5 (actual analogue gain of 2.60)"
config VL6180X_ALS_GAIN_5
bool "ALS gain setting 5 (actual analogue gain of 5.21)"
config VL6180X_ALS_GAIN_10
bool "ALS gain setting 10 (actual analogue gain of 10.32)"
config VL6180X_ALS_GAIN_20
bool "ALS gain setting 20 (actual analogue gain of 20)"
config VL6180X_ALS_GAIN_40
bool "ALS gain setting 40 (actual analogue gain of 40)"
endchoice
config VL6180X_ALS_LUX_RES
int "ALS lux resolution [lux/count*1000]"
range 1 320
default 320
help
ALS lux resolution is used to convert count values from ambient
light sensing to lux values. It is specified as lux/count*1000.
The factory calibrated lux resolution is 0.32 lux/count.
endif # USEMODULE_VL6180X_ALS
config VL6180X_MEAS_PERIOD
int "Measurement period in continuous mode [10 ms]"
range 0 255
default 20
help
The measurement period is defined as multiple of 10 ms. It is used for
both range measurements and ambient light sensing (ALS) in
continuous mode.
The measurement period also controls the measurement mode used after
sensor initialization. If the measurement period is 0, the single-shot
mode is used for both the range and ALS measurements, and functions
vl6180x_rng_start_single and vl6180x_als_start_single have to be used
to start a single measurement. Otherwise the continuous mode is
used for both measurements which are started immediatly after sensor
initialization.
if USEMODULE_VL6180X_IRQ
choice
bool "Ranging interrupt mode"
depends on USEMODULE_VL6180X_RNG
default VL6180X_RNG_INT_DRDY
help
Interrupt defines the interrupt that is enabled for ranging.
config VL6180X_RNG_INT_DRDY
bool "Data Ready"
help
Interrupt is triggered when new ranging data are ready to be read
config VL6180X_RNG_INT_LOW
bool "Level Low"
help
Interrupt is triggered when ranging values are below lower threshold
config VL6180X_RNG_INT_HIGH
bool "Level High"
help
Interrupt is triggered when ranging values are above upper threshold
config VL6180X_RNG_INT_OUT
bool "Out of Window"
help
Interrupt is triggered when ranging values are below the lower
threshold or above the upper threshold (out of threshold window)
endchoice
config VL6180X_RNG_THRESH_LOW
int "Ranging lower threshold [mm]"
depends on VL6180X_RNG_INT_LOW || VL6180X_RNG_INT_OUT
range 0 255
default 20
help
Interrupt is triggered when ranging values are below this threshold
config VL6180X_RNG_THRESH_HIGH
int "Ranging upper threshold [mm]"
depends on VL6180X_RNG_INT_HIGH || VL6180X_RNG_INT_OUT
range 0 255
default 90
help
Interrupt is triggered when ranging values are above this threshold
choice
bool "ALS interrupt mode"
depends on USEMODULE_VL6180X_ALS
default VL6180X_ALS_INT_DRDY
help
Interrupt defines the interrupt that is enabled for ALS.
config VL6180X_ALS_INT_DRDY
bool "Data Ready"
help
Interrupt is triggered when new ALS data are ready to be read
config VL6180X_ALS_INT_LOW
bool "Level Low"
help
Interrupt is triggered when ALS values are below lower threshold
config VL6180X_ALS_INT_HIGH
bool "Level High"
help
Interrupt is triggered when ALS values are above upper threshold
config VL6180X_ALS_INT_OUT
bool "Out of Window"
help
Interrupt is triggered when ALS values are below the lower
threshold or above the upper threshold (out of threshold window)
endchoice
config VL6180X_ALS_THRESH_LOW
int "ALS lower threshold [counts]"
depends on VL6180X_ALS_INT_LOW || VL6180X_ALS_INT_OUT
range 0 65535
default 50
help
Interrupt is triggered when ALS values are below this threshold
config VL6180X_ALS_THRESH_HIGH
int "ALS upper threshold [counts]"
depends on VL6180X_ALS_INT_HIGH || VL6180X_ALS_INT_OUT
range 0 65535
default 2000
help
Interrupt is triggered when ALS values are above this threshold
endif # USEMODULE_VL6180X_IRQ
endif # USEMODULE_VL6180X