Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
vcnl40x0_internals.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2017 Inria
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
19
#ifndef VCNL40X0_INTERNALS_H
20
#define VCNL40X0_INTERNALS_H
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
29
#define VCNL40X0_ADDR (0x13)
30
34
#define VCNL40X0_PRODUCT_ID (0x20)
35
40
#define VCNL40X0_REG_COMMAND (0x80)
41
#define VCNL40X0_REG_PRODUCT_ID (0x81)
42
#define VCNL40X0_REG_PROXIMITY_RATE (0x82)
43
#define VCNL40X0_REG_PROXIMITY_CURRENT (0x83)
44
#define VCNL40X0_REG_AMBIENT_PARAMETER (0x84)
45
#define VCNL40X0_REG_AMBIENT_VALUE (0x85)
46
#define VCNL40X0_REG_PROXIMITY_VALUE (0x87)
47
#define VCNL40X0_REG_INTERRUPT_CONTROL (0x89)
48
#define VCNL40X0_REG_INTERRUPT_LOW_THRES (0x8a)
49
#define VCNL40X0_REG_HIGH_THRES (0x8c)
50
#define VCNL40X0_REG_INTERRUPT_STATUS (0x8e)
51
#define VCNL40X0_REG_PROX_TIMING (0xf9)
52
#define VCNL40X0_REG_AMBIENT_IR_LIGHT_LEVEL (0x90)
/* should not be used */
59
#define VCNL40X0_COMMAND_ALL_DISABLE (0x00)
60
#define VCNL40X0_COMMAND_SELFTIMED_MODE_ENABLE (0x01)
61
#define VCNL40X0_COMMAND_PROX_ENABLE (0x02)
62
#define VCNL40X0_COMMAND_AMBI_ENABLE (0x04)
63
#define VCNL40X0_COMMAND_PROX_ON_DEMAND (0x08)
64
#define VCNL40X0_COMMAND_AMBI_ON_DEMAND (0x10)
65
#define VCNL40X0_COMMAND_MASK_PROX_DATA_READY (0x20)
66
#define VCNL40X0_COMMAND_MASK_AMBI_DATA_READY (0x40)
67
#define VCNL40X0_COMMAND_MASK_LOCK (0x80)
74
#define VCNL40X0_PRODUCT_MASK_REVISION_ID (0x0f)
75
#define VCNL40X0_PRODUCT_MASK_PRODUCT_ID (0xf0)
82
#define VCNL40X0_PROXIMITY_MASK_MEASUREMENT_RATE (0x07)
83
#define VCNL40X0_PROXIMITY_MASK_LED_CURRENT (0x3f)
84
#define VCNL40X0_PROXIMITY_MASK_FUSE_PROG_ID (0xc0)
91
#define VCNL40X0_AMBIENT_MASK_PARA_AVERAGE (0x07)
92
#define VCNL40X0_AMBIENT_PARA_AUTO_OFFSET_ENABLE (0x08)
93
#define VCNL40X0_AMBIENT_MASK_PARA_AUTO_OFFSET (0x08)
94
#define VCNL40X0_AMBIENT_MASK_PARA_MEAS_RATE (0x70)
95
#define VCNL40X0_AMBIENT_PARA_CONT_CONV_ENABLE (0x80)
96
#define VCNL40X0_AMBIENT_MASK_PARA_CONT_CONV (0x80)
103
#define VCNL40X0_INTERRUPT_THRES_SEL_PROX (0x00)
104
#define VCNL40X0_INTERRUPT_THRES_SEL_ALS (0x01)
105
#define VCNL40X0_INTERRUPT_THRES_ENABLE (0x02)
106
#define VCNL40X0_INTERRUPT_ALS_READY_ENABLE (0x04)
107
#define VCNL40X0_INTERRUPT_PROX_READY_ENABLE (0x08)
108
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_1 (0x00)
109
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_2 (0x20)
110
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_4 (0x40)
111
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_8 (0x60)
112
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_16 (0x80)
113
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_32 (0xa0)
114
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_64 (0xc0)
115
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_128 (0xe0)
116
#define VCNL40X0_INTERRUPT_MASK_COUNT_EXCEED (0xe0)
123
#define VCNL40X0_INTERRUPT_STATUS_THRES_HI (0x01)
124
#define VCNL40X0_INTERRUPT_STATUS_THRES_LO (0x02)
125
#define VCNL40X0_INTERRUPT_STATUS_ALS_READY (0x04)
126
#define VCNL40X0_INTERRUPT_STATUS_PROX_READY (0x08)
127
#define VCNL40X0_INTERRUPT_MASK_STATUS_THRES_HI (0x01)
128
#define VCNL40X0_INTERRUPT_MASK_THRES_LO (0x02)
129
#define VCNL40X0_INTERRUPT_MASK_ALS_READY (0x04)
130
#define VCNL40X0_INTERRUPT_MASK_PROX_READY (0x08)
133
#ifdef __cplusplus
134
}
135
#endif
136
137
#endif
/* VCNL40X0_INTERNALS_H */
Generated on Sat Nov 23 2024 19:57:24 by
1.9.8