Doc fixes.
[bertos.git] / drv / thermo.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2004, 2005 Develer S.r.l. (http://www.develer.com/)
30  *
31  * -->
32  *
33  * \brief Thermo-control driver
34  *
35  * \version $Id$
36  *
37  * \author Giovanni Bajo <rasky@develer.com>
38  * \author Francesco Sacchi <batt@develer.com>
39  *
40  * This module implements multiple thermo controls, which is the logic needed to try
41  * keeping the temperature of a device constant. For this module, a "device" is a black box
42  * whose temperature can be measured, and which has a mean to make it hotter or colder.
43  * For instance, a device could be the combination of a NTC (analog temperature reader) and
44  * a Peltier connected to the same physic block.
45  *
46  * This module relies on a low-level driver to communicate with the device (implementation
47  * of the black box). This low-level driver also controls the units in which the temperature
48  * is expressed: thermo control treats it just as a number.
49  *
50  */
51
52 /*#*
53  *#* $Log$
54  *#* Revision 1.3  2006/09/20 20:12:41  marco
55  *#* Names convention, MOD_* macros.
56  *#*
57  *#* Revision 1.2  2006/07/19 12:56:26  bernie
58  *#* Convert to new Doxygen style.
59  *#*
60  *#* Revision 1.1  2005/11/04 17:59:47  bernie
61  *#* Import into DevLib.
62  *#*
63  *#* Revision 1.2  2005/06/14 10:13:36  batt
64  *#* Better thermo errors handling.
65  *#*
66  *#* Revision 1.1  2005/05/24 09:17:58  batt
67  *#* Move drivers to top-level.
68  *#*
69  *#* Revision 1.4  2005/05/10 16:55:10  batt
70  *#* Add timeout to thermo-regulator; better thermo control handling; change thermo_getStatus() to thermo_status().
71  *#*
72  *#* Revision 1.3  2005/05/10 09:26:54  batt
73  *#* Add thermo_getStatus for getting status/errors of thermo control.
74  *#*
75  *#* Revision 1.2  2005/05/09 19:18:40  batt
76  *#* Remove old logs.
77  *#*
78  *#* Revision 1.1  2005/05/09 16:40:44  batt
79  *#* Add thermo-control driver
80  *#*/
81
82
83 #ifndef DRV_THERMO_H
84 #define DRV_THERMO_H
85
86 #include <drv/ntc.h>
87 #include <thermo_map.h>
88
89 void thermo_init(void);
90
91
92 /**
93  * Set the target temperature at which a given device should be kept.
94  *
95  * \param dev Device
96  * \param temperature Target temperature
97  */
98 void thermo_setTarget(ThermoDev dev, deg_t temperature);
99
100 /** Start thermo control for a certain device \a dev */
101 void thermo_start(ThermoDev dev);
102
103 /** Stop thermo control for a certain device \a dev */
104 void thermo_stop(ThermoDev dev);
105
106 /** Clear errors for channel \a dev */
107 void thermo_clearErrors(ThermoDev dev);
108
109 /** Return the status of the specific \a dev thermo-device. */
110 thermostatus_t thermo_status(ThermoDev dev);
111
112 /**
113  * Return the current temperature of a device currently under thermo
114  * control.
115  *
116  * \param dev Device
117  * \return Current temperature (Celsius degrees * 10)
118  */
119 deg_t thermo_readTemperature(ThermoDev dev);
120
121
122 #endif /* DRV_THERMO_H */