xref: /netbsd-src/sys/dev/i2c/si70xxreg.h (revision aa56d549ada3ad8ca41ef7a1d22e6213014ab725)
1 /*	$NetBSD: si70xxreg.h,v 1.2 2017/12/29 02:20:47 christos Exp $	*/
2 
3 /*
4  * Copyright (c) 2017 Brad Spencer <brad@anduin.eldar.org>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _DEV_I2C_SI70XXREG_H_
20 #define _DEV_I2C_SI70XXREG_H_
21 
22 #define SI70XX_TYPICAL_ADDR	0x40
23 
24 #define SI70XX_MEASURE_RH_HOLD 0xE5
25 #define SI70XX_MEASURE_RH_NOHOLD 0xF5
26 #define SI70XX_MEASURE_TEMP_HOLD 0xE3
27 #define SI70XX_MEASURE_TEMP_NOHOLD 0xF3
28 #define SI70XX_READ_PREVIOUS_TEMP 0xE0
29 #define SI70XX_RESET 0xFE
30 #define SI70XX_WRITE_USER_REG_1 0xE6
31 #define SI70XX_READ_USER_REG_1 0xE7
32 #define SI70XX_WRITE_HEATER_REG 0x51
33 #define SI70XX_READ_HEATER_REG 0x11
34 #define SI70XX_READ_ID_PT1A 0xFA
35 #define SI70XX_READ_ID_PT1B 0x0F
36 #define SI70XX_READ_ID_PT2A 0xFC
37 #define SI70XX_READ_ID_PT2B 0xC9
38 #define SI70XX_READ_FW_VERA 0x84
39 #define SI70XX_READ_FW_VERB 0xB8
40 
41 #define SI70XX_VDDS_MASK 0x40
42 #define SI70XX_HTRE_MASK 0x04
43 #define SI70XX_RESOLUTION_MASK 0x81
44 #define SI70XX_HEATER_MASK 0x0F
45 
46 #endif
47