BeRTOS
Functions
thermo.h File Reference

Thermo-control driver. More...

#include "hw/thermo_map.h"
#include <drv/ntc.h>
#include <drv/timer.h>

Go to the source code of this file.

Functions

void thermo_setTarget (ThermoDev dev, deg_t temperature)
 Set the target temperature at which a given device should be kept.
void thermo_timer (ThermoDev dev, mtime_t on_time)
 Start thermo control for a certain device dev and stop it after on_time msec.
void thermo_start (ThermoDev dev)
 Start thermo control for a certain device dev.
void thermo_stop (ThermoDev dev)
 Stop thermo control for a certain device dev.
void thermo_clearErrors (ThermoDev dev)
 Clear errors for channel dev.
thermostatus_t thermo_status (ThermoDev dev)
 Return the status of the specific dev thermo-device.
deg_t thermo_readTemperature (ThermoDev dev)
 Return the current temperature of a device currently under thermo control.
void thermo_init (void)
 Init thermo-control and associated hw.

Detailed Description

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 <rasky@develer.com>
Francesco Sacchi <batt@develer.com>
Daniele Basile <asterix@develer.com>

Definition in file thermo.h.


Function Documentation

deg_t thermo_readTemperature ( ThermoDev  dev)

Return the current temperature of a device currently under thermo control.

Parameters:
devDevice
Returns:
Current temperature (Celsius degrees * 10)

Definition at line 292 of file thermo.c.

void thermo_setTarget ( ThermoDev  dev,
deg_t  temperature 
)

Set the target temperature at which a given device should be kept.

Parameters:
devDevice
temperatureTarget temperature

Definition at line 235 of file thermo.c.

thermostatus_t thermo_status ( ThermoDev  dev)

Return the status of the specific dev thermo-device.

Definition at line 103 of file thermo.c.