/** * \file * * * \brief Thermo-control driver. * * This module implements multiple thermo controls, which is the logic needed to try * keeping the temperature of a device constant. For this module, a "device" is a black box * whose temperature can be measured, and which has a mean to make it hotter or colder. * For instance, a device could be the combination of a NTC (analog temperature reader) and * a Peltier connected to the same physic block. * * This module relies on a low-level driver to communicate with the device (implementation * of the black box). This low-level driver also controls the units in which the temperature * is expressed: thermo control treats it just as a number. * * * \author Giovanni Bajo * \author Francesco Sacchi * \author Daniele Basile * * $WIZ$ module_name = "thermo" * $WIZ$ module_depends = "timer", "ntc" * $WIZ$ module_configuration = "bertos/cfg/cfg_thermo.h" * $WIZ$ module_hw = "bertos/hw/hw_thermo.h", "bertos/hw/thermo_map.h" */ #ifndef DRV_THERMO_H #define DRV_THERMO_H #include "hw/thermo_map.h" #include #include typedef uint8_t thermostatus_t; /** * Set the target temperature at which a given device should be kept. * * \param dev Device * \param temperature Target temperature */ void thermo_setTarget(ThermoDev dev, deg_t temperature); /** * Start thermo control for a certain device \a dev and stop it after * \a on_time msec. */ void thermo_timer(ThermoDev dev, mtime_t on_time); /** Start thermo control for a certain device \a dev */ void thermo_start(ThermoDev dev); /** Stop thermo control for a certain device \a dev */ void thermo_stop(ThermoDev dev); /** Clear errors for channel \a dev */ void thermo_clearErrors(ThermoDev dev); /** Return the status of the specific \a dev thermo-device. */ thermostatus_t thermo_status(ThermoDev dev); /** * Return the current temperature of a device currently under thermo * control. * * \param dev Device * \return Current temperature (Celsius degrees * 10) */ deg_t thermo_readTemperature(ThermoDev dev); void thermo_init(void); #endif /* DRV_THERMO_H */