isl29125-internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015 Ludwig Knüpfer
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 ISL29125_INTERNAL_H
20 #define ISL29125_INTERNAL_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
29 #define ISL29125_I2C_ADDRESS 0x44
30 
35 #define ISL29125_ID 0x7D
36 
42 /* main register */
43 #define ISL29125_REG_ID 0x00
44 #define ISL29125_REG_RESET 0x00
45 /* configuration registers */
46 #define ISL29125_REG_CONF1 0x01
47 #define ISL29125_REG_CONF2 0x02
48 #define ISL29125_REG_CONF3 0x03
49 /* interrupt mode threshold registers */
50 #define ISL29125_REG_LTHLB 0x04
51 #define ISL29125_REG_LTHHB 0x05
52 #define ISL29125_REG_HTHLB 0x06
53 #define ISL29125_REG_HTHHB 0x07
54 /* status register */
55 #define ISL29125_REG_STATUS 0x08
56 /* sensor readout registers (double buffered) */
57 #define ISL29125_REG_GDLB 0x09
58 #define ISL29125_REG_GDHB 0x0A
59 #define ISL29125_REG_RDLB 0x0B
60 #define ISL29125_REG_RDHB 0x0C
61 #define ISL29125_REG_BDLB 0x0D
62 #define ISL29125_REG_BDHB 0x0E
63 
69 #define ISL29125_CMD_RESET 0x46
70 
76 /* ISL29125_REG_CONF1 B2:B0 */
77 #define ISL29125_CON1_MASK_MODE 0x07
78 /* ISL29125_REG_CONF1 B3 */
79 #define ISL29125_CON1_MASK_RANGE 0x08
80 /* ISL29125_REG_CONF1 B4 */
81 #define ISL29125_CON1_MASK_RES 0x10
82 /* ISL29125_REG_CONF1 B5 */
83 #define ISL29125_CON1_MASK_SYNC 0x20
84 #define ISL29125_CON1_SYNCOFF 0x00
85 #define ISL29125_CON1_SYNCON 0x20
86 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif /* ISL29125_INTERNAL_H */
93