Convert to new Doxygen style.
[bertos.git] / drv / thermo.h
1 /**
2  * \file
3  * <!--
4  * Copyright 2004, 2005 Develer S.r.l. (http://www.develer.com/)
5  * This file is part of DevLib - See README.devlib for information.
6  * -->
7  *
8  * \brief Thermo-control driver
9  *
10  * \version $Id$
11  *
12  * \author Giovanni Bajo <rasky@develer.com>
13  * \author Francesco Sacchi <batt@develer.com>
14  *
15  * This module implements multiple thermo controls, which is the logic needed to try
16  * keeping the temperature of a device constant. For this module, a "device" is a black box
17  * whose temperature can be measured, and which has a mean to make it hotter or colder.
18  * For instance, a device could be the combination of a NTC (analog temperature reader) and
19  * a Peltier connected to the same physic block.
20  *
21  * This module relies on a low-level driver to communicate with the device (implementation
22  * of the black box). This low-level driver also controls the units in which the temperature
23  * is expressed: thermo control treats it just as a number.
24  *
25  */
26
27 /*#*
28  *#* $Log$
29  *#* Revision 1.2  2006/07/19 12:56:26  bernie
30  *#* Convert to new Doxygen style.
31  *#*
32  *#* Revision 1.1  2005/11/04 17:59:47  bernie
33  *#* Import into DevLib.
34  *#*
35  *#* Revision 1.2  2005/06/14 10:13:36  batt
36  *#* Better thermo errors handling.
37  *#*
38  *#* Revision 1.1  2005/05/24 09:17:58  batt
39  *#* Move drivers to top-level.
40  *#*
41  *#* Revision 1.4  2005/05/10 16:55:10  batt
42  *#* Add timeout to thermo-regulator; better thermo control handling; change thermo_getStatus() to thermo_status().
43  *#*
44  *#* Revision 1.3  2005/05/10 09:26:54  batt
45  *#* Add thermo_getStatus for getting status/errors of thermo control.
46  *#*
47  *#* Revision 1.2  2005/05/09 19:18:40  batt
48  *#* Remove old logs.
49  *#*
50  *#* Revision 1.1  2005/05/09 16:40:44  batt
51  *#* Add thermo-control driver
52  *#*/
53
54
55 #ifndef DRV_THERMO_H
56 #define DRV_THERMO_H
57
58 #include <drv/ntc.h>
59 #include <thermo_map.h>
60
61 void thermo_init(void);
62
63
64 /**
65  * Set the target temperature at which a given device should be kept.
66  *
67  * \param dev Device
68  * \param temperature Target temperature
69  */
70 void thermo_setTarget(ThermoDev dev, deg_t temperature);
71
72 /** Start thermo control for a certain device \a dev */
73 void thermo_start(ThermoDev dev);
74
75 /** Stop thermo control for a certain device \a dev */
76 void thermo_stop(ThermoDev dev);
77
78 /** Clear errors for channel \a dev */
79 void thermo_clearErrors(ThermoDev dev);
80
81 /** Return the status of the specific \a dev thermo-device. */
82 thermostatus_t thermo_status(ThermoDev dev);
83
84 /**
85  * Return the current temperature of a device currently under thermo
86  * control.
87  *
88  * \param dev Device
89  * \return Current temperature (Celsius degrees * 10)
90  */
91 deg_t thermo_read_temperature(ThermoDev dev);
92
93
94 #endif /* DRV_THERMO_H */