Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
vl6180x_regs.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021 Gunar Schorcht
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
17
#ifndef VL6180X_REGS_H
18
#define VL6180X_REGS_H
19
20
#ifdef __cplusplus
21
extern
"C"
22
{
23
#endif
24
29
#define VL6180X_REG_MODEL_ID (0x00)
30
#define VL6180X_REG_MODEL_REV_MAJOR (0x01)
31
#define VL6180X_REG_MODEL_REV_MINOR (0x02)
32
#define VL6180X_REG_MODULE_REV_MAJOR (0x03)
33
#define VL6180X_REG_MODULE_REV_MINOR (0x04)
35
#define VL6180X_REG_GPIO0_MODE (0x10)
36
#define VL6180X_REG_GPIO1_MODE (0x11)
37
#define VL6180X_REG_HISTORY_CTRL (0x12)
38
#define VL6180X_REG_INT_CONFIG (0x14)
39
#define VL6180X_REG_INT_CLR (0x15)
40
#define VL6180X_REG_FRESH_RST (0x16)
42
#define VL6180X_REG_RNG_START (0x18)
43
#define VL6180X_REG_RNG_THRESH_HI (0x19)
44
#define VL6180X_REG_RNG_THRESH_LO (0x1a)
45
#define VL6180X_REG_RNG_PERIOD (0x1b)
46
#define VL6180X_REG_RNG_MAX_TIME (0x1c)
47
#define VL6180X_REG_RNG_VALUE (0x62)
49
#define VL6180X_REG_ALS_START (0x38)
50
#define VL6180X_REG_ALS_THRESH_HI (0x3a)
51
#define VL6180X_REG_ALS_THRESH_LO (0x3c)
52
#define VL6180X_REG_ALS_PERIOD (0x3e)
53
#define VL6180X_REG_ALS_GAIN (0x3f)
54
#define VL6180X_REG_ALS_INT_TIME (0x40)
55
#define VL6180X_REG_ALS_VALUE (0x50)
57
#define VL6180X_REG_RNG_STATUS (0x4d)
58
#define VL6180X_REG_ALS_STATUS (0x4e)
59
#define VL6180X_REG_INT_STATUS (0x4f)
61
#define VL6180X_REG_I2C_ADDR (0x212)
62
#define VL6180X_REG_INTERLEAVED_MODE (0x2a3)
70
/* VL6180X_REG_RNG_START */
71
#define VL6180X_RNG_MODE_CONT (0x02)
72
#define VL6180X_RNG_START_STOP (0x01)
74
/* VL6180X_REG_ALS_START */
75
#define VL6180X_ALS_MODE_CONT (0x02)
76
#define VL6180X_ALS_START_STOP (0x01)
78
/* VL6180X_REG_RNG_STATUS */
79
#define VL6180X_RNG_ERR_CODE (0xf0)
80
#define VL6180X_RNG_ERR_CODE_S (4)
81
#define VL6180X_RNG_DEVICE_RDY (0x01)
83
/* VL6180X_REG_ALS_STATUS */
84
#define VL6180X_ALS_ERR_CODE (0xf0)
85
#define VL6180X_ALS_ERR_CODE_S (4)
86
#define VL6180X_ALS_DEVICE_RDY (0x01)
88
/* VL6180X_REG_ALS_GAIN */
89
#define VL6180X_ALS_GAIN_LIGHT (0x07)
91
/* VL6180X_REG_INT_CONFIG and VL6180X_REG_INT_STATUS */
92
#define VL6180X_INT_RNG (0x07)
93
#define VL6180X_INT_RNG_S (0)
94
#define VL6180X_INT_ALS (0x38)
95
#define VL6180X_INT_ALS_S (3)
96
#define VL6180X_ERR_INT (0xc0)
97
#define VL6180X_ERR_INT_S (6)
99
#define VL6180X_INT_RNG_LOW (0x01)
100
#define VL6180X_INT_RNG_HIGH (0x02)
101
#define VL6180X_INT_RNG_OUT (0x03)
102
#define VL6180X_INT_RNG_DRDY (0x04)
103
#define VL6180X_INT_ALS_LOW (0x08)
104
#define VL6180X_INT_ALS_HIGH (0x10)
105
#define VL6180X_INT_ALS_OUT (0x18)
106
#define VL6180X_INT_ALS_DRDY (0x20)
107
#define VL6180X_INT_ERR_LASER (0x40)
108
#define VL6180X_INT_ERR_PLL (0x80)
110
/* VL6180X_REG_INT_CLR */
111
#define VL6180X_CLR_ERR_INT (0x04)
112
#define VL6180X_CLR_ALS_INT (0x02)
113
#define VL6180X_CLR_RNG_INT (0x01)
114
#define VL6180X_CLR_ALL_INT (0x07)
116
/* VL6180X_REG_GPIO0_MODE */
117
#define VL6180X_GPIO0_SHUT (0x40)
118
#define VL6180X_GPIO0_SHUT_ON (0x40)
119
#define VL6180X_GPIO0_SHUT_OFF (0x00)
120
#define VL6180X_GPIO0_POL (0x20)
121
#define VL6180X_GPIO0_POL_LOW (0x00)
122
#define VL6180X_GPIO0_POL_HIGH (0x20)
123
#define VL6180X_GPIO0_FUNC (0x1e)
124
#define VL6180X_GPIO0_FUNC_OFF (0x00)
125
#define VL6180X_GPIO0_FUNC_ON (0x10)
127
/* VL6180X_REG_GPIO1_MODE */
128
#define VL6180X_GPIO1_POL (0x20)
129
#define VL6180X_GPIO1_POL_LOW (0x00)
130
#define VL6180X_GPIO1_POL_HIGH (0x20)
131
#define VL6180X_GPIO1_FUNC (0x1e)
132
#define VL6180X_GPIO1_FUNC_OFF (0x00)
133
#define VL6180X_GPIO1_FUNC_ON (0x10)
144
#define VL6180X_MODEL_ID (0xb4)
147
#ifdef __cplusplus
148
}
149
#endif
150
151
#endif
/* VL6180X_REGS_H */
Generated on Thu Nov 21 2024 13:53:01 by
1.9.8