ccs811_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Gunar Schorcht
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 
17 #ifndef CCS811_REGS_H
18 #define CCS811_REGS_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
28 #define CCS811_REG_STATUS (0x00)
29 #define CCS811_REG_MEAS_MODE (0x01)
30 #define CCS811_REG_ALG_RESULT_DATA (0x02)
31 #define CCS811_REG_RAW_DATA (0x03)
32 #define CCS811_REG_ENV_DATA (0x05)
33 #define CCS811_REG_NTC (0x06)
34 #define CCS811_REG_THRESHOLDS (0x10)
35 #define CCS811_REG_BASELINE (0x11)
36 
37 #define CCS811_REG_HW_ID (0x20)
38 #define CCS811_REG_HW_VER (0x21)
39 #define CCS811_REG_FW_BOOT_VER (0x23)
40 #define CCS811_REG_FW_APP_VER (0x24)
41 
42 #define CCS811_REG_ERROR_ID (0xe0)
43 
44 #define CCS811_REG_APP_ERASE (0xf1)
45 #define CCS811_REG_APP_DATA (0xf2)
46 #define CCS811_REG_APP_VERIFY (0xf3)
47 #define CCS811_REG_APP_START (0xf4)
48 #define CCS811_REG_SW_RESET (0xff)
49 
55 #define CCS811_STATUS_ERROR (0x01)
56 #define CCS811_STATUS_DATA_RDY (0x08)
57 #define CCS811_STATUS_APP_VALID (0x10)
58 #define CCS811_STATUS_FW_MODE (0x80)
65 #define CCS811_ERR_WRITE_REG_INV (0x01)
66 #define CCS811_ERR_READ_REG_INV (0x02)
67 #define CCS811_ERR_MEASMODE_INV (0x04)
68 #define CCS811_ERR_MAX_RESISTANCE (0x08)
69 #define CCS811_ERR_HEATER_FAULT (0x10)
70 #define CCS811_ERR_HEATER_SUPPLY (0x20)
74 #define CCS811_HW_ID (0x81)
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif /* CCS811_REGS_H */
81