47 #include "lib/sensors.h" 51 void tmp102_write_reg(uint8_t reg, uint16_t val);
52 uint16_t tmp102_read_reg(uint8_t reg);
53 uint16_t tmp102_read_temp_raw();
54 int8_t tmp102_read_temp_simple();
55 int16_t tmp102_read_temp_x100();
57 #define TMP102_ADDR 0x48 58 #define TMP102_TEMP 0x00 59 #define TMP102_CONF 0x01 60 #define TMP102_TLOW 0x02 61 #define TMP102_THIGH 0x03 64 #define TMP102_PWR_DIR P5DIR 65 #define TMP102_PWR_SEL P5SEL 66 #define TMP102_PWR_SEL2 P5SEL2 67 #define TMP102_PWR_REN P5REN 68 #define TMP102_PWR_OUT P5OUT 69 #define TMP102_PWR_PIN (1<<0) 71 #define TMP102_SUCCESS 0 72 #define TMP102_ERROR (-1) 73 #define TMP102_READ 0x01 75 #define TMP102_SENSOR "TMP102 sensor" 77 extern const struct sensors_sensor tmp102;
I2C communication device driver header file for Zolertia Z1 sensor node.
void tmp102_init(void)
Initialiser for the TMP102 sensor driver.