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