temp.h

Go to the documentation of this file.
00001 #ifndef _TEMP_H
00002 #define _TEMP_H
00003 
00004 #include  "config.h"
00005 #include  <stdint.h>
00006 
00007 /*
00008 NOTES
00009 
00010 no point in specifying a port- all the different temp sensors we have must be on a particular port. The MAX6675 must be on the SPI, and the thermistor and AD595 must be on an analog port.
00011 
00012 we still need to specify which analog pins we use in machine.h for the analog sensors however, otherwise the analog subsystem won't read them.
00013 */
00014 
00015 #undef DEFINE_TEMP_SENSOR
00016 #define DEFINE_TEMP_SENSOR(name, type, pin, additional) TEMP_SENSOR_ ## name,
00017 typedef enum {
00018   #include "config.h"
00019   NUM_TEMP_SENSORS,
00020   TEMP_SENSOR_none
00021 } temp_sensor_t;
00022 #undef DEFINE_TEMP_SENSOR
00023 
00024 typedef enum {
00025   TT_THERMISTOR,
00026   TT_MAX6675,
00027   TT_AD595,
00028   TT_PT100,
00029   TT_INTERCOM,
00030   TT_DUMMY,
00031 } temp_type_t;
00032 
00033 #define temp_tick temp_sensor_tick
00034 
00035 void temp_init(void);
00036 
00037 void temp_sensor_tick(void);
00038 
00039 uint8_t temp_achieved(void);
00040 
00041 void temp_set(temp_sensor_t index, uint16_t temperature);
00042 uint16_t temp_get(temp_sensor_t index);
00043 
00044 void temp_print(temp_sensor_t index);
00045 
00046 #endif  /* _TEMP_H */
 All Data Structures Files Functions Variables Defines
Generated on Mon Jul 30 16:33:58 2012 for Teacup by  doxygen 1.6.3