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