si70xx_internals.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Bas Stottelaar <basstottelaar@gmail.com>
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 
19 #ifndef SI70XX_INTERNALS_H
20 #define SI70XX_INTERNALS_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
29 #define SI70XX_I2C_ADDRESS (0x40)
30 
35 #define SI70XX_MEASURE_RH_HOLD (0xE5)
36 #define SI70XX_MEASURE_RH (0xF5)
37 #define SI70XX_MEASURE_TEMP_HOLD (0xE3)
38 #define SI70XX_MEASURE_TEMP (0xF3)
39 #define SI70XX_MEASURE_TEMP_PREV (0xE0)
40 #define SI70XX_RESET (0xFE)
41 #define SI70XX_WRITE_USER_REG (0xE6)
42 #define SI70XX_READ_USER_REG (0xE7)
43 #define SI70XX_WRITE_HEATER_REG (0x51)
44 #define SI70XX_READ_HEATER_REG (0x11)
45 #define SI70XX_READ_ID_FIRST_A (0xFA)
46 #define SI70XX_READ_ID_FIRST_B (0x0F)
47 #define SI70XX_READ_ID_SECOND_A (0xFC)
48 #define SI70XX_READ_ID_SECOND_B (0xC9)
49 #define SI70XX_READ_REVISION_A (0x84)
50 #define SI70XX_READ_REVISION_B (0xB8)
51 
57 #if defined(MODULE_SI7006)
58 #define SI70XX_ID (0x06)
59 #elif defined(MODULE_SI7013)
60 #define SI70XX_ID (0x0D)
61 #elif defined(MODULE_SI7020)
62 #define SI70XX_ID (0x14)
63 #elif defined(MODULE_SI7021)
64 #define SI70XX_ID (0x15)
65 #else
66 #error "Please provide a valid Si70xx variant (Si7006/13/20/21)"
67 #endif
68 
69 #define SI70XX_REVISION_1 (0xFF)
70 #define SI70XX_REVISION_2 (0x20)
71 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* SI70XX_INTERNALS_H */
78