Contiki-NG
Loading...
Searching...
No Matches

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

#include "contiki.h"
#include "lib/sensors.h"
#include "sys/ctimer.h"
#include "dev/i2c-arch.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 sensor_init (void)
 Initialize the TMP-007 sensor driver.
 
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.
 
static void convert (uint16_t *local_tmp, uint16_t *obj_tmp)
 Convert raw data to values in degrees Celsius.
 
static int value (int type)
 Returns a reading from the sensor.
 
static int configure (int type, int enable)
 Configuration function for the TMP-007 sensor.
 
static int status (int type)
 Returns the status of the sensor.
 

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.