thermo.c File Reference
Thermo-control driver.
More...
#include "hw/thermo_map.h"
#include "hw/hw_thermo.h"
#include "cfg/cfg_thermo.h"
#include <cfg/module.h>
#include <cfg/macros.h>
#include <cfg/debug.h>
#include <cfg/log.h>
#include <drv/thermo.h>
#include <drv/timer.h>
#include <drv/ntc.h>
#include <kern/proc.h>
Go to the source code of this file.
Functions |
| thermostatus_t | thermo_status (ThermoDev dev) |
| | Return the status of the specific dev thermo-device.
|
|
static void | thermo_do (ThermoDev index) |
| | Do a single thermo control for device dev.
|
|
static void | thermo_softint (void) |
| | Thermo soft interrupt.
|
| void | thermo_timer (ThermoDev dev, mtime_t on_time) |
| | Starts a thermo-regulation for channel dev, and turn off timer when on_time was elapsed.
|
| void | thermo_setTarget (ThermoDev dev, deg_t temperature) |
| | Set the target temperature temperature for a specific dev thermo-device.
|
| void | thermo_start (ThermoDev dev) |
| | Starts a thermo-regulation for channel dev.
|
| void | thermo_stop (ThermoDev dev) |
| | Stops a thermo-regulation for channel dev.
|
|
void | thermo_clearErrors (ThermoDev dev) |
| | Clear errors for channel dev.
|
| deg_t | thermo_readTemperature (ThermoDev dev) |
| | Read the temperature of the thermo-device dev using mobile mean.
|
|
void | thermo_init (void) |
| | Init thermo-control and associated hw.
|
Variables |
| static Timer | thermo_timer |
| | Timer for thermo-regulation.
|
| ThermoControlDev | devs [THERMO_CNT] |
| | Array of thermo-devices.
|
Detailed Description
Thermo-control driver.
The Thermo controll can works both with kernel or without it. In the case we use kernel, the thermo controll is done by one process that poll every CONFIG_THERMO_INTERVAL_MS the temperature sensor and make all operation to follow the target temperature. While we not use the kernel the module works with one timer interrupt in the same way of the kenel case.
- Author:
- Giovanni Bajo <rasky@develer.com>
-
Francesco Sacchi <batt@develer.com>
-
Daniele Basile <asterix@develer.com>
Definition in file thermo.c.
Function Documentation
| deg_t thermo_readTemperature |
( |
ThermoDev |
dev |
) |
|
Read the temperature of the thermo-device dev using mobile mean.
Return the current temperature of a device currently under thermo control.
Definition at line 292 of file thermo.c.
| void thermo_setTarget |
( |
ThermoDev |
dev, |
|
|
deg_t |
temperature | |
|
) |
| | |
Set the target temperature temperature for a specific dev thermo-device.
Set the target temperature at which a given device should be kept.
Definition at line 235 of file thermo.c.
| void thermo_start |
( |
ThermoDev |
dev |
) |
|
Starts a thermo-regulation for channel dev.
Start thermo control for a certain device dev.
Definition at line 247 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.
| void thermo_stop |
( |
ThermoDev |
dev |
) |
|
Stops a thermo-regulation for channel dev.
Stop thermo control for a certain device dev.
Definition at line 270 of file thermo.c.
| void thermo_timer |
( |
ThermoDev |
dev, |
|
|
mtime_t |
on_time | |
|
) |
| | |
Starts a thermo-regulation for channel dev, and turn off timer when on_time was elapsed.
Start thermo control for a certain device dev and stop it after on_time msec.
Definition at line 223 of file thermo.c.
Variable Documentation
| ThermoControlDev devs[THERMO_CNT] |
Array of thermo-devices.
Definition at line 98 of file thermo.c.
Timer thermo_timer [static] |