Loading...
Searching...
No Matches

Default configuration for ST VL6180X Ranging and Ambient Light Sensing (ALS) module. More...

Detailed Description

Default configuration for ST VL6180X Ranging and Ambient Light Sensing (ALS) module.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file vl6180x_params.h.

#include "board.h"
#include "saul_reg.h"
#include "vl6180x.h"
+ Include dependency graph for vl6180x_params.h:

Go to the source code of this file.

Variables

static const vl6180x_params_t vl6180x_params []
 Allocate some memory to store the actual configuration.
 
static const saul_reg_info_t vl6180x_saul_info []
 Additional meta information to keep in the SAUL registry.
 

Default hardware configuration

#define VL6180X_PARAM_DEV   I2C_DEV(0)
 Default I2C_DEV(0) device.
 
#define VL6180X_PARAM_ADDR   (VL6180X_I2C_ADDR)
 Default I2C device address.
 
#define VL6180X_PARAM_INT_PIN   (GPIO_PIN(0, 1))
 Default interrupt pin.
 
#define VL6180X_PARAM_SHUTDOWN_PIN   (GPIO_PIN(0, 2))
 Default shutdown pin.
 

Default sensor configuration parameters

#define CONFIG_VL6180X_MEAS_PERIOD   (20)
 Default period for range and ALS measurements in steps of 10 ms: 200 ms.
 
#define CONFIG_VL6180X_RNG_MAX_TIME   (50)
 Default ranging maximum convergence time: 50 ms.
 
#define CONFIG_VL6180X_RNG_INT   (VL6180X_INT_DRDY)
 Default interrupt mode for ranging: VL6180X_INT_DRDY.
 
#define CONFIG_VL6180X_RNG_THRESH_LOW   (20)
 Default low threshold value for ranging comparison: 20 mm.
 
#define CONFIG_VL6180X_RNG_THRESH_HIGH   (90)
 Default high threshold value for ranging comparison: 90 mm.
 
#define CONFIG_VL6180X_ALS_INT_TIME   (100)
 Default ALS integration time: 100 ms (recommended by the datasheet)
 
#define CONFIG_VL6180X_ALS_GAIN   (VL6180X_ALS_GAIN_1)
 Default ALS analogue light channel gain: 1.0.
 
#define CONFIG_VL6180X_ALS_LUX_RES   320
 Default ALS lux resolution specified as lux/count*1000: 0.32 count/lux is factory calibrated.
 
#define CONFIG_VL6180X_ALS_INT   (VL6180X_INT_DRDY)
 Default interrupt mode for ranging: VL6180X_INT_DRDY.
 
#define CONFIG_VL6180X_ALS_THRESH_LOW   (50)
 Default low threshold value for ALS comparison: 50 counts.
 
#define CONFIG_VL6180X_ALS_THRESH_HIGH   (2000)
 Default high threshold value for ALS comparison: 2000 counts.
 
#define VL6180X_PARAM_RANGE   .rng_max_time = CONFIG_VL6180X_RNG_MAX_TIME,
 Range measurement configuration parameters.
 
#define VL6180X_PARAM_ALS
 ALS measurement configuration parameters.
 
#define VL6180X_PARAM_SHUTDOWN   .shutdown_pin = VL6180X_PARAM_SHUTDOWN_PIN,
 Shutdown hardware configuration.
 
#define VL6180X_PARAM_INT   .int_pin = VL6180X_PARAM_INT_PIN,
 Interrupt pin configuration.
 
#define VL6180X_PARAM_INT_RNG_CFG
 Interrupt configuration for ranging.
 
#define VL6180X_PARAM_INT_ALS_CFG
 Interrupt configuration for ALS.
 
#define VL6180X_PARAMS
 Default configuration parameter set.
 
#define VL6180X_SAUL_INFO   { .name = "vl6180x" }
 Default SAUL information.
 

Macro Definition Documentation

◆ CONFIG_VL6180X_ALS_GAIN

#define CONFIG_VL6180X_ALS_GAIN   (VL6180X_ALS_GAIN_1)

Default ALS analogue light channel gain: 1.0.

Definition at line 132 of file vl6180x_params.h.

◆ CONFIG_VL6180X_ALS_INT

#define CONFIG_VL6180X_ALS_INT   (VL6180X_INT_DRDY)

Default interrupt mode for ranging: VL6180X_INT_DRDY.

Definition at line 142 of file vl6180x_params.h.

◆ CONFIG_VL6180X_ALS_INT_TIME

#define CONFIG_VL6180X_ALS_INT_TIME   (100)

Default ALS integration time: 100 ms (recommended by the datasheet)

Definition at line 127 of file vl6180x_params.h.

◆ CONFIG_VL6180X_ALS_LUX_RES

#define CONFIG_VL6180X_ALS_LUX_RES   320

Default ALS lux resolution specified as lux/count*1000: 0.32 count/lux is factory calibrated.

Definition at line 137 of file vl6180x_params.h.

◆ CONFIG_VL6180X_ALS_THRESH_HIGH

#define CONFIG_VL6180X_ALS_THRESH_HIGH   (2000)

Default high threshold value for ALS comparison: 2000 counts.

Definition at line 152 of file vl6180x_params.h.

◆ CONFIG_VL6180X_ALS_THRESH_LOW

#define CONFIG_VL6180X_ALS_THRESH_LOW   (50)

Default low threshold value for ALS comparison: 50 counts.

Definition at line 147 of file vl6180x_params.h.

◆ CONFIG_VL6180X_MEAS_PERIOD

#define CONFIG_VL6180X_MEAS_PERIOD   (20)

Default period for range and ALS measurements in steps of 10 ms: 200 ms.

Definition at line 102 of file vl6180x_params.h.

◆ CONFIG_VL6180X_RNG_INT

#define CONFIG_VL6180X_RNG_INT   (VL6180X_INT_DRDY)

Default interrupt mode for ranging: VL6180X_INT_DRDY.

Definition at line 112 of file vl6180x_params.h.

◆ CONFIG_VL6180X_RNG_MAX_TIME

#define CONFIG_VL6180X_RNG_MAX_TIME   (50)

Default ranging maximum convergence time: 50 ms.

Definition at line 107 of file vl6180x_params.h.

◆ CONFIG_VL6180X_RNG_THRESH_HIGH

#define CONFIG_VL6180X_RNG_THRESH_HIGH   (90)

Default high threshold value for ranging comparison: 90 mm.

Definition at line 122 of file vl6180x_params.h.

◆ CONFIG_VL6180X_RNG_THRESH_LOW

#define CONFIG_VL6180X_RNG_THRESH_LOW   (20)

Default low threshold value for ranging comparison: 20 mm.

Definition at line 117 of file vl6180x_params.h.

◆ VL6180X_PARAM_ADDR

#define VL6180X_PARAM_ADDR   (VL6180X_I2C_ADDR)

Default I2C device address.

Definition at line 39 of file vl6180x_params.h.

◆ VL6180X_PARAM_ALS

#define VL6180X_PARAM_ALS
Value:
.als_int_time = CONFIG_VL6180X_ALS_INT_TIME, \
.als_gain = CONFIG_VL6180X_ALS_GAIN, \
#define CONFIG_VL6180X_ALS_INT_TIME
Default ALS integration time: 100 ms (recommended by the datasheet)
#define CONFIG_VL6180X_ALS_LUX_RES
Default ALS lux resolution specified as lux/count*1000: 0.32 count/lux is factory calibrated.
#define CONFIG_VL6180X_ALS_GAIN
Default ALS analogue light channel gain: 1.0.

ALS measurement configuration parameters.

Definition at line 164 of file vl6180x_params.h.

◆ VL6180X_PARAM_DEV

#define VL6180X_PARAM_DEV   I2C_DEV(0)

Default I2C_DEV(0) device.

Definition at line 34 of file vl6180x_params.h.

◆ VL6180X_PARAM_INT

#define VL6180X_PARAM_INT   .int_pin = VL6180X_PARAM_INT_PIN,

Interrupt pin configuration.

Definition at line 180 of file vl6180x_params.h.

◆ VL6180X_PARAM_INT_ALS_CFG

#define VL6180X_PARAM_INT_ALS_CFG
Value:
.int_cfg.als_int = CONFIG_VL6180X_ALS_INT, \
.int_thresh.als_low = CONFIG_VL6180X_ALS_THRESH_LOW, \
.int_thresh.als_high = CONFIG_VL6180X_ALS_THRESH_HIGH,
#define CONFIG_VL6180X_ALS_THRESH_LOW
Default low threshold value for ALS comparison: 50 counts.
#define CONFIG_VL6180X_ALS_THRESH_HIGH
Default high threshold value for ALS comparison: 2000 counts.
#define CONFIG_VL6180X_ALS_INT
Default interrupt mode for ranging: VL6180X_INT_DRDY.

Interrupt configuration for ALS.

Definition at line 193 of file vl6180x_params.h.

◆ VL6180X_PARAM_INT_PIN

#define VL6180X_PARAM_INT_PIN   (GPIO_PIN(0, 1))

Default interrupt pin.

Definition at line 44 of file vl6180x_params.h.

◆ VL6180X_PARAM_INT_RNG_CFG

#define VL6180X_PARAM_INT_RNG_CFG
Value:
.int_cfg.rng_int = CONFIG_VL6180X_RNG_INT, \
.int_thresh.rng_low = CONFIG_VL6180X_RNG_THRESH_LOW, \
.int_thresh.rng_high = CONFIG_VL6180X_RNG_THRESH_HIGH,
#define CONFIG_VL6180X_RNG_THRESH_LOW
Default low threshold value for ranging comparison: 20 mm.
#define CONFIG_VL6180X_RNG_INT
Default interrupt mode for ranging: VL6180X_INT_DRDY.
#define CONFIG_VL6180X_RNG_THRESH_HIGH
Default high threshold value for ranging comparison: 90 mm.

Interrupt configuration for ranging.

Definition at line 184 of file vl6180x_params.h.

◆ VL6180X_PARAM_RANGE

#define VL6180X_PARAM_RANGE   .rng_max_time = CONFIG_VL6180X_RNG_MAX_TIME,

Range measurement configuration parameters.

Definition at line 157 of file vl6180x_params.h.

◆ VL6180X_PARAM_SHUTDOWN

#define VL6180X_PARAM_SHUTDOWN   .shutdown_pin = VL6180X_PARAM_SHUTDOWN_PIN,

Shutdown hardware configuration.

Definition at line 173 of file vl6180x_params.h.

◆ VL6180X_PARAM_SHUTDOWN_PIN

#define VL6180X_PARAM_SHUTDOWN_PIN   (GPIO_PIN(0, 2))

Default shutdown pin.

Definition at line 49 of file vl6180x_params.h.

◆ VL6180X_PARAMS

#define VL6180X_PARAMS
Value:
{ \
.i2c_dev = VL6180X_PARAM_DEV, \
.i2c_addr = VL6180X_PARAM_ADDR, \
VL6180X_PARAM_RANGE \
VL6180X_PARAM_ALS \
VL6180X_PARAM_SHUTDOWN \
VL6180X_PARAM_INT \
VL6180X_PARAM_INT_RNG_CFG \
VL6180X_PARAM_INT_ALS_CFG \
}
#define VL6180X_PARAM_ADDR
Default I2C device address.
#define VL6180X_PARAM_DEV
Default I2C_DEV(0) device.
#define CONFIG_VL6180X_MEAS_PERIOD
Default period for range and ALS measurements in steps of 10 ms: 200 ms.

Default configuration parameter set.

Definition at line 208 of file vl6180x_params.h.

◆ VL6180X_SAUL_INFO

#define VL6180X_SAUL_INFO   { .name = "vl6180x" }

Default SAUL information.

Definition at line 223 of file vl6180x_params.h.

Variable Documentation

◆ vl6180x_params

const vl6180x_params_t vl6180x_params[]
static
Initial value:
=
{
}
#define VL6180X_PARAMS
Default configuration parameter set.

Allocate some memory to store the actual configuration.

Definition at line 230 of file vl6180x_params.h.

◆ vl6180x_saul_info

const saul_reg_info_t vl6180x_saul_info[]
static
Initial value:
=
{
}
#define VL6180X_SAUL_INFO
Default SAUL information.

Additional meta information to keep in the SAUL registry.

Definition at line 238 of file vl6180x_params.h.