Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
tsl2561_internals.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 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
20
#ifndef TSL2561_INTERNALS_H
21
#define TSL2561_INTERNALS_H
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
#define TSL2561_ID (0x50)
38
#define TSL2561_REGISTER_CONTROL (0x00)
39
#define TSL2561_REGISTER_TIMING (0x01)
40
#define TSL2561_REGISTER_THRESHOLDLOW (0x02)
41
#define TSL2561_REGISTER_THRESHOLDHIGH (0x04)
42
#define TSL2561_REGISTER_INTERRUPT (0x06)
43
#define TSL2561_REGISTER_ID (0x0A)
44
#define TSL2561_REGISTER_CHAN0 (0x0C)
45
#define TSL2561_REGISTER_CHAN1 (0x0E)
52
#define TSL2561_COMMAND_MODE (0x80)
53
#define TSL2561_COMMAND_CLEAR (0x40)
54
#define TSL2561_COMMAND_WORD (0x20)
55
#define TSL2561_COMMAND_BLOCK (0x10)
62
#define TSL2561_CONTROL_POWERON (0x03)
63
#define TSL2561_CONTROL_POWEROFF (0x00)
70
#define TSL2561_LUXSCALE (14)
/* use 2e14 scaling */
71
#define TSL2561_RATIOSCALE (9)
/* use 2e9 scaling */
72
#define TSL2561_CHSCALE (10)
/* use 2e10 scaling on
73
* channel values by */
74
#define TSL2561_CHSCALE_TINT0 (0x7517)
75
#define TSL2561_CHSCALE_TINT1 (0x0FE7)
76
77
#define TSL2561_K1T (0x0040)
78
#define TSL2561_B1T (0x01f2)
79
#define TSL2561_M1T (0x01be)
80
#define TSL2561_K2T (0x0080)
81
#define TSL2561_B2T (0x0214)
82
#define TSL2561_M2T (0x02d1)
83
#define TSL2561_K3T (0x00c0)
84
#define TSL2561_B3T (0x023f)
85
#define TSL2561_M3T (0x037b)
86
#define TSL2561_K4T (0x0100)
87
#define TSL2561_B4T (0x0270)
88
#define TSL2561_M4T (0x03fe)
89
#define TSL2561_K5T (0x0138)
90
#define TSL2561_B5T (0x016f)
91
#define TSL2561_M5T (0x01fc)
92
#define TSL2561_K6T (0x019a)
93
#define TSL2561_B6T (0x00d2)
94
#define TSL2561_M6T (0x00fb)
95
#define TSL2561_K7T (0x029a)
96
#define TSL2561_B7T (0x0018)
97
#define TSL2561_M7T (0x0012)
98
#define TSL2561_K8T (0x029a)
99
#define TSL2561_B8T (0x0000)
100
#define TSL2561_M8T (0x0000)
103
#ifdef __cplusplus
104
}
105
#endif
106
107
#endif
/* TSL2561_INTERNALS_H */
Generated on Sat Dec 21 2024 20:58:03 by
1.9.8