extruder/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 #undef _CONFIG_H
00017 #define DEFINE_TEMP_SENSOR(name, type, pin) TEMP_SENSOR_ ## name,
00018 typedef enum {
00019   #include "config.h"
00020   NUM_TEMP_SENSORS,
00021   TEMP_SENSOR_none
00022 } temp_sensor_t;
00023 #undef DEFINE_TEMP_SENSOR
00024 
00025 typedef enum {
00026   TT_THERMISTOR,
00027   TT_MAX6675,
00028   TT_AD595,
00029   TT_PT100,
00030   TT_INTERCOM,
00031   TT_DUMMY,
00032 } temp_type_t;
00033 
00034 #define temp_tick temp_sensor_tick
00035 
00036 void temp_init(void);
00037 
00038 void temp_sensor_tick(void);
00039 
00040 uint8_t temp_achieved(void);
00041 
00042 void temp_set(temp_sensor_t index, uint16_t temperature);
00043 uint16_t temp_get(temp_sensor_t index);
00044 
00045 void temp_print(temp_sensor_t index);
00046 
00047 #endif  /* _TEMP_H */
 All Data Structures Files Functions Variables Defines