From 9839ac9fff05feeb1f8b80d02838cb558480dd01 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Thu, 7 Oct 2010 22:19:34 +0200 Subject: [PATCH] Move heater macros from config.h to heater.h, as they're not meant to be user configurable. --- config.h.dist | 12 ------------ heater.h | 9 +++++++++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/config.h.dist b/config.h.dist index 0c5e758..c5fb5b3 100644 --- a/config.h.dist +++ b/config.h.dist @@ -180,18 +180,6 @@ // -------------------------------------------------------------------------- // you shouldn't need to edit anything below this line -/* - Heater -*/ - -#ifdef HEATER_PWM - #define enable_heater() do { TCCR0A |= MASK(COM0A1); } while (0) - #define disable_heater() do { TCCR0A &= ~MASK(COM0A1); } while (0) -#else - #define enable_heater() WRITE(HEATER_PIN, 1) - #define disable_heater() WRITE(HEATER_PIN, 0) -#endif - /* fan */ diff --git a/heater.h b/heater.h index 56e760f..0a7c7a8 100644 --- a/heater.h +++ b/heater.h @@ -1,8 +1,17 @@ #ifndef _HEATER_H #define _HEATER_H +#include "config.h" #include +#ifdef HEATER_PWM + #define enable_heater() do { TCCR0A |= MASK(COM0A1); } while (0) + #define disable_heater() do { TCCR0A &= ~MASK(COM0A1); } while (0) +#else + #define enable_heater() WRITE(HEATER_PIN, 1) + #define disable_heater() WRITE(HEATER_PIN, 0) +#endif + // extruder heater PID factors // google "PID without a PHD" if you don't understand this PID stuff extern int32_t p_factor;