Contiki-NG
cc2538-temp-sensor.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015, Zolertia - http://www.zolertia.com
3 * Copyright (c) 2015, University of Bristol - http://www.bristol.ac.uk
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30 * OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32/*---------------------------------------------------------------------------*/
33/**
34 * \addtogroup cc2538-sensors
35 * @{
36 *
37 * \defgroup cc2538-temp-sensor CC2538 on-chip temperature Sensor
38 *
39 * Driver for the CC2538 on-chip temperature sensor
40 *
41 * This driver can return the raw as well as the converted value of the sensor
42 * reading. This is controlled by the type argument of the sensor driver's
43 * value() function. The choices for the type argument are:
44 * - CC2538_SENSORS_VALUE_TYPE_RAW (value() returns the raw reading)
45 * - CC2538_SENSORS_VALUE_TYPE_CONVERTED (value() returns degrees mC)
46 * @{
47 *
48 * \file
49 * Header file for the CC2538 on-chip temperature Sensor Driver
50 */
51/*---------------------------------------------------------------------------*/
52#ifndef CC2538_TEMP_SENSOR_H_
53#define CC2538_TEMP_SENSOR_H_
54/*---------------------------------------------------------------------------*/
55#include "lib/sensors.h"
56/*---------------------------------------------------------------------------*/
57/**
58 * \name temperature sensor
59 * @{
60 */
61#define TEMP_SENSOR "On-Chip Temperature"
62/** @} */
63/*---------------------------------------------------------------------------*/
64extern const struct sensors_sensor cc2538_temp_sensor;
65/*---------------------------------------------------------------------------*/
66#endif /* CC2538_TEMP_SENSOR_H_ */
67/*---------------------------------------------------------------------------*/
68/**
69 * @}
70 * @}
71 */
const struct sensors_sensor cc2538_temp_sensor
Exports a global symbol to be used by the sensor API.