32 #ifndef BSP430_SENSORS_MCP9808_H
33 #define BSP430_SENSORS_MCP9808_H
57 #define BSP430_SENSORS_MCP9808_I2C_ADDRESS 0x18
60 #define BSP430_SENSORS_MCP9808_REGNO_CONFIG 1
63 #define BSP430_SENSORS_MCP9808_REGNO_TUPPER 2
66 #define BSP430_SENSORS_MCP9808_REGNO_TLOWER 3
69 #define BSP430_SENSORS_MCP9808_REGNO_TCRIT 4
72 #define BSP430_SENSORS_MCP9808_REGNO_TA 5
75 #define BSP430_SENSORS_MCP9808_REGNO_MFGID 6
78 #define BSP430_SENSORS_MCP9808_REGNO_DEVID 7
81 #define BSP430_SENSORS_MCP9808_REGNO_RESOLUTION 8
84 #define BSP430_SENSORS_MCP9808_CONFIG_HYST0p0 0x0000
87 #define BSP430_SENSORS_MCP9808_CONFIG_HYST1p5 0x0200
90 #define BSP430_SENSORS_MCP9808_CONFIG_HYST3p0 0x0400
93 #define BSP430_SENSORS_MCP9808_CONFIG_HYST6p0 0x0600
96 #define BSP430_SENSORS_MCP9808_CONFIG_HYSTM 0x0600
100 #define BSP430_SENSORS_MCP9808_CONFIG_SHDN 0x0010
103 #define BSP430_SENSORS_MCP9808_CONFIG_CRITLCK 0x0080
106 #define BSP430_SENSORS_MCP9808_CONFIG_WNDWLCK 0x0040
109 #define BSP430_SENSORS_MCP9808_CONFIG_INTCLR 0x0020
112 #define BSP430_SENSORS_MCP9808_CONFIG_ALRSTAT 0x0010
115 #define BSP430_SENSORS_MCP9808_CONFIG_ALRCTL 0x0008
118 #define BSP430_SENSORS_MCP9808_CONFIG_ALRSEL 0x0004
121 #define BSP430_SENSORS_MCP9808_CONFIG_ALRPOL 0x0002
124 #define BSP430_SENSORS_MCP9808_CONFIG_ALRMOD 0x0001
127 #define BSP430_SENSORS_MCP9808_CONVERSION_ms(res_) ((0 == (res_)) ? 30 \
128 : (1 == (res_)) ? 35 \
129 : (2 == (res_)) ? 130 \
134 #define BSP430_SENSORS_MCP9808_TEMP_CRIT 0x8000
138 #define BSP430_SENSORS_MCP9808_TEMP_HIGH 0x4000
142 #define BSP430_SENSORS_MCP9808_TEMP_LOW 0x2000
145 #define BSP430_SENSORS_MCP9808_TEMP_SIGN 0x1000
148 #define BSP430_SENSORS_MCP9808_TEMP_MASK 0x0FFF
152 #define BSP430_SENSORS_MCP9808_OFFSET_Kd160 (43704UL)
static BSP430_CORE_INLINE int iBSP430sensorsMCP9808tempFromRaw_cK(uint16_t raw)
Definition: mcp9808.h:156
Hardware presentation/abstraction for generic timers (Timer_A/Timer_B)
#define BSP430_SENSORS_MCP9808_OFFSET_Kd160
Definition: mcp9808.h:152
#define BSP430_CORE_INLINE
Definition: core.h:439
Declarations for abstracted serial interface.
#define BSP430_SENSORS_MCP9808_TEMP_MASK
Definition: mcp9808.h:148
#define BSP430_SENSORS_MCP9808_TEMP_SIGN
Definition: mcp9808.h:145