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
* SPDX-FileCopyrightText: 2016 Inria
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
27
#define TSL2561_ID (0x50)
29
34
#define TSL2561_REGISTER_CONTROL (0x00)
35
#define TSL2561_REGISTER_TIMING (0x01)
36
#define TSL2561_REGISTER_THRESHOLDLOW (0x02)
37
#define TSL2561_REGISTER_THRESHOLDHIGH (0x04)
38
#define TSL2561_REGISTER_INTERRUPT (0x06)
39
#define TSL2561_REGISTER_ID (0x0A)
40
#define TSL2561_REGISTER_CHAN0 (0x0C)
41
#define TSL2561_REGISTER_CHAN1 (0x0E)
43
48
#define TSL2561_COMMAND_MODE (0x80)
49
#define TSL2561_COMMAND_CLEAR (0x40)
50
#define TSL2561_COMMAND_WORD (0x20)
51
#define TSL2561_COMMAND_BLOCK (0x10)
53
58
#define TSL2561_CONTROL_POWERON (0x03)
59
#define TSL2561_CONTROL_POWEROFF (0x00)
61
66
#define TSL2561_LUXSCALE (14)
/* use 2e14 scaling */
67
#define TSL2561_RATIOSCALE (9)
/* use 2e9 scaling */
68
#define TSL2561_CHSCALE (10)
/* use 2e10 scaling on
69
* channel values by */
70
#define TSL2561_CHSCALE_TINT0 (0x7517)
71
#define TSL2561_CHSCALE_TINT1 (0x0FE7)
72
73
#define TSL2561_K1T (0x0040)
74
#define TSL2561_B1T (0x01f2)
75
#define TSL2561_M1T (0x01be)
76
#define TSL2561_K2T (0x0080)
77
#define TSL2561_B2T (0x0214)
78
#define TSL2561_M2T (0x02d1)
79
#define TSL2561_K3T (0x00c0)
80
#define TSL2561_B3T (0x023f)
81
#define TSL2561_M3T (0x037b)
82
#define TSL2561_K4T (0x0100)
83
#define TSL2561_B4T (0x0270)
84
#define TSL2561_M4T (0x03fe)
85
#define TSL2561_K5T (0x0138)
86
#define TSL2561_B5T (0x016f)
87
#define TSL2561_M5T (0x01fc)
88
#define TSL2561_K6T (0x019a)
89
#define TSL2561_B6T (0x00d2)
90
#define TSL2561_M6T (0x00fb)
91
#define TSL2561_K7T (0x029a)
92
#define TSL2561_B7T (0x0018)
93
#define TSL2561_M7T (0x0012)
94
#define TSL2561_K8T (0x029a)
95
#define TSL2561_B8T (0x0000)
96
#define TSL2561_M8T (0x0000)
98
99
#ifdef __cplusplus
100
}
101
#endif
102
Generated on Tue Apr 14 2026 19:28:58 by
1.13.2