Sistema l'errore da me commesso in fase di conversione...
[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.3  2006/09/20 20:12:41  marco
30  *#* Names convention, MOD_* macros.
31  *#*
32  *#* Revision 1.2  2006/07/19 12:56:26  bernie
33  *#* Convert to new Doxygen style.
34  *#*
35  *#* Revision 1.1  2005/11/04 17:59:47  bernie
36  *#* Import into DevLib.
37  *#*
38  *#* Revision 1.2  2005/06/14 10:13:36  batt
39  *#* Better thermo errors handling.
40  *#*
41  *#* Revision 1.1  2005/05/24 09:17:58  batt
42  *#* Move drivers to top-level.
43  *#*
44  *#* Revision 1.4  2005/05/10 16:55:10  batt
45  *#* Add timeout to thermo-regulator; better thermo control handling; change thermo_getStatus() to thermo_status().
46  *#*
47  *#* Revision 1.3  2005/05/10 09:26:54  batt
48  *#* Add thermo_getStatus for getting status/errors of thermo control.
49  *#*
50  *#* Revision 1.2  2005/05/09 19:18:40  batt
51  *#* Remove old logs.
52  *#*
53  *#* Revision 1.1  2005/05/09 16:40:44  batt
54  *#* Add thermo-control driver
55  *#*/
56
57
58 #ifndef DRV_THERMO_H
59 #define DRV_THERMO_H
60
61 #include <drv/ntc.h>
62 #include <thermo_map.h>
63
64 void thermo_init(void);
65
66
67 /**
68  * Set the target temperature at which a given device should be kept.
69  *
70  * \param dev Device
71  * \param temperature Target temperature
72  */
73 void thermo_setTarget(ThermoDev dev, deg_t temperature);
74
75 /** Start thermo control for a certain device \a dev */
76 void thermo_start(ThermoDev dev);
77
78 /** Stop thermo control for a certain device \a dev */
79 void thermo_stop(ThermoDev dev);
80
81 /** Clear errors for channel \a dev */
82 void thermo_clearErrors(ThermoDev dev);
83
84 /** Return the status of the specific \a dev thermo-device. */
85 thermostatus_t thermo_status(ThermoDev dev);
86
87 /**
88  * Return the current temperature of a device currently under thermo
89  * control.
90  *
91  * \param dev Device
92  * \return Current temperature (Celsius degrees * 10)
93  */
94 deg_t thermo_readTemperature(ThermoDev dev);
95
96
97 #endif /* DRV_THERMO_H */