thermo.c File Reference
Thermo-control driver.
More...
#include "hw/thermo_map.h"
#include "hw/hw_thermo.h"
#include <cfg/module.h>
#include <cfg/macros.h>
#include <cfg/debug.h>
#include <drv/thermo.h>
#include <drv/timer.h>
#include <drv/ntc.h>
Go to the source code of this file.
|
Defines |
| #define | THERMO_INTERVAL_MS 100 |
| | Interval at which thermo control is performed.
|
| #define | THERMO_HIFI_NUM_SAMPLES 10 |
| | Number of different samples we interpolate over to get the hifi temperature.
|
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_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.
- Version:
- Id
- thermo.c 1729 2008-08-27 14:26:53Z batt
- Author:
- Giovanni Bajo <rasky@develer.com>
Francesco Sacchi <batt@develer.com>
Definition in file thermo.c.
Define Documentation
| #define THERMO_HIFI_NUM_SAMPLES 10 |
Number of different samples we interpolate over to get the hifi temperature.
Definition at line 58 of file thermo.c.
| #define THERMO_INTERVAL_MS 100 |
Interval at which thermo control is performed.
Definition at line 55 of 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 233 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 177 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 189 of file thermo.c.
| thermostatus_t thermo_status |
( |
ThermoDev |
dev |
) |
|
Return the status of the specific dev thermo-device.
Definition at line 79 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 211 of file thermo.c.
Variable Documentation
| ThermoControlDev devs[THERMO_CNT] |
Array of thermo-devices.
Definition at line 73 of file thermo.c.