pin definitions and I/O macros More...
#include "config.h"#include <stdint.h>#include "temp.h"Go to the source code of this file.
Defines | |
| #define | enable_heater() heater_set(0, 64) |
| #define | disable_heater() heater_set(0, 0) |
| #define | DEFINE_HEATER(name, port, pin, pwm) HEATER_ ## name, |
Enumerations | |
| enum | heater_t |
Functions | |
| void | heater_init (void) |
| initialise heater subsystem Set directions, initialise PWM timers, read PID factors from eeprom, etc | |
| void | heater_save_settings (void) |
| Write PID factors to eeprom. | |
| void | heater_set (heater_t index, uint8_t value) |
| manually set PWM output | |
| void | heater_tick (heater_t h, temp_sensor_t t, uint16_t current_temp, uint16_t target_temp) |
| run heater PID algorithm | |
| uint8_t | heaters_all_off (void) |
| turn off all heaters | |
| void | pid_set_p (heater_t index, int32_t p) |
| set heater P factor | |
| void | pid_set_i (heater_t index, int32_t i) |
| set heater I factor | |
| void | pid_set_d (heater_t index, int32_t d) |
| set heater D factor | |
| void | pid_set_i_limit (heater_t index, int32_t i_limit) |
| set heater I limit | |
| void | heater_print (uint16_t i) |
| send heater debug info to host | |
pin definitions and I/O macros
why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
| void heater_print | ( | uint16_t | i ) |
send heater debug info to host
| i | index of heater to send info for |
Referenced by process_gcode_command().
| void heater_set | ( | heater_t | index, |
| uint8_t | value | ||
| ) |
manually set PWM output
| index | the heater we're setting the output for |
| value | the PWM value to write |
anything done by this function is overwritten by heater_tick above if the heater has an associated temp sensor
Referenced by dda_start(), dda_step(), heater_tick(), and process_gcode_command().
| void heater_tick | ( | heater_t | h, |
| temp_sensor_t | t, | ||
| uint16_t | current_temp, | ||
| uint16_t | target_temp | ||
| ) |
run heater PID algorithm
| h | which heater we're running the loop for |
| t | which temp sensor this heater is attached to |
| current_temp | the temperature that the associated temp sensor is reporting |
| target_temp | the temperature we're trying to achieve |
Referenced by temp_sensor_tick().
| uint8_t heaters_all_off | ( | void | ) |
| void pid_set_d | ( | heater_t | index, |
| int32_t | d | ||
| ) |
set heater D factor
| index | heater to change D factor for |
| d | scaled D factor |
Referenced by process_gcode_command().
| void pid_set_i | ( | heater_t | index, |
| int32_t | i | ||
| ) |
set heater I factor
| index | heater to change I factor for |
| i | scaled I factor |
Referenced by process_gcode_command().
| void pid_set_i_limit | ( | heater_t | index, |
| int32_t | i_limit | ||
| ) |
set heater I limit
| index | heater to set I limit for |
| i_limit | scaled I limit |
Referenced by process_gcode_command().
| void pid_set_p | ( | heater_t | index, |
| int32_t | p | ||
| ) |
set heater P factor
| index | heater to change factor for |
| p | scaled P factor |
Referenced by process_gcode_command().
1.7.2