Contiki-NG
Macros | Functions

Driver for the Sensortag TI TMP-007 IR Thermophile sensor. More...

#include "contiki.h"
#include "lib/sensors.h"
#include "sys/ctimer.h"
#include "board-conf.h"
#include "tmp-007-sensor.h"
#include <Board.h>
#include <ti/drivers/I2C.h>
#include <ti/drivers/PIN.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>

Go to the source code of this file.

Macros

#define VAL_CONFIG_ON   0x1000
 Sensor on state.
 
#define VAL_CONFIG_OFF   0x0000
 Sensor off state.
 
#define VAL_PROD_ID   0x0078
 Product ID.
 

Functions

static bool i2c_write_read (void *wbuf, size_t wcount, void *rbuf, size_t rcount)
 Setup and peform an I2C transaction. More...
 
static bool i2c_write (void *wbuf, size_t wcount)
 Peform a write only I2C transaction. More...
 
static bool i2c_read (void *rbuf, size_t rcount)
 Peform a read only I2C transaction. More...
 
static bool sensor_init (void)
 Initialize the TMP-007 sensor driver. More...
 
static void notify_ready_cb (void *not_used)
 Callback when sensor is ready to read data from.
 
static bool enable_sensor (bool enable)
 Turn the sensor on or off.
 
static bool read_data (uint16_t *local_tmp, uint16_t *obj_tmp)
 Read the sensor value registers. More...
 
static void convert (uint16_t *local_tmp, uint16_t *obj_tmp)
 Convert raw data to values in degrees Celsius. More...
 
static int value (int type)
 Returns a reading from the sensor. More...
 
static int configure (int type, int enable)
 Configuration function for the TMP-007 sensor. More...
 
static int status (int type)
 Returns the status of the sensor. More...
 

Detailed Description

Driver for the Sensortag TI TMP-007 IR Thermophile sensor.

Author
Edvard Pettersen e.pet.nosp@m.ters.nosp@m.en@ti.nosp@m..com

Definition in file tmp-007-sensor.c.