tmp00x_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 - 2019 HAW Hamburg
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 TMP00X_REGS_V_OBJECT 0x00
31  #define TMP00X_REGS_T_AMBIENT 0x01
32  #define TMP00X_REGS_CONFIG 0x02
34  #define TMP00X_CONFIG_RST (1 << 15)
36  #define TMP00X_CONFIG_MOD_SHIFT (12U)
37  #define TMP00X_CONFIG_MOD_MASK (0x7000)
38  #define TMP00X_CONFIG_MOD(x) (((uint16_t)(((uint16_t)(x)) \
39  << TMP00X_CONFIG_MOD_SHIFT)) \
40  & TMP00X_CONFIG_MOD_MASK)
41  #define TMP00X_CONFIG_MOD_CC (0x07)
42  #define TMP00X_CONFIG_MOD_OFF (0x00)
44  #define TMP00X_CONFIG_CR_SHIFT (9U)
45  #define TMP00X_CONFIG_CR_MASK (0x0E00)
46  #define TMP00X_CONFIG_CR(x) (((uint16_t)(((uint16_t)(x)) \
47  << TMP00X_CONFIG_CR_SHIFT)) \
48  & TMP00X_CONFIG_CR_MASK)
50  #define TMP00X_DRDY_PIN_EN (1 << 8)
57  #ifdef MODULE_TMP006
58  #define TMP00X_REGS_DEVICE_ID 0xFF
59  #define TMP00X_REGS_READ_STATUS TMP00X_REGS_CONFIG
60  #define TMP00X_DRDY (1 << 7)
61  #define TMP00X_DID_VALUE (0x0067)
62  #elif defined(MODULE_TMP007)
63  #define TMP00X_REGS_DEVICE_ID 0x1F
64  #define TMP00X_REGS_READ_STATUS TMP007_REGS_STATUS
65  #define TMP00X_DRDY (1 << 14)
66  #define TMP00X_DID_VALUE (0x0078)
67  #else
68  #error "TMP00X DRIVER not selected or supported"
69  #endif
76  #define TMP006_REGS_MANUFACTURER_ID 0xFE
83  #define TMP007_REGS_OBJ_TEMP 0x03
84  #define TMP007_REGS_STATUS 0x04
85  #define TMP007_REGS_STAT_MASK_EN 0x05
86  #define TMP007_REGS_OBJ_HIGH_LIMIT_TEMP 0x06
87  #define TMP007_REGS_OBJ_LOW_LIMIT_TEMP 0x07
88  #define TMP007_REGS_LOCAL_HIGH_LIMIT_TEMP 0x08
89  #define TMP007_REGS_LOCAL_LOW_LIMIT_TEMP 0x09
90  #define TMP007_REGS_S0_COEFFCIENT 0x0A
91  #define TMP007_REGS_A0_COEFFCIENT 0x0B
92  #define TMP007_REGS_A1_COEFFCIENT 0x0C
93  #define TMP007_REGS_B0_COEFFCIENT 0x0D
94  #define TMP007_REGS_B1_COEFFCIENT 0x0E
95  #define TMP007_REGS_B2_COEFFCIENT 0x0F
96  #define TMP007_REGS_C_COEFFCIENT 0x10
97  #define TMP007_REGS_TC0_COEFFCIENT 0x11
98  #define TMP007_REGS_TC1_COEFFCIENT 0x12
99  #define TMP007_REGS_MEM_ACCES 0x2A
102 #ifdef __cplusplus
103 }
104 #endif
105