Permalink
Browse files

Move timer macros from config.h.dist and derivates to timer.c.

This sould confuse users less and neither value is subject to change
per configuration. Reviewed also by Markus Amsler.
  • Loading branch information...
1 parent 2c53dbe commit 4ca9e470a5bb7f5549358b301350bf0ff2498a55 @Traumflug Traumflug committed Feb 22, 2011
Showing with 6 additions and 24 deletions.
  1. +0 −6 config.gen3.h
  2. +0 −6 config.gen6.h
  3. +0 −6 config.h.dist
  4. +0 −6 config.ramps.h
  5. +6 −0 timer.c
View
@@ -368,12 +368,6 @@ DEFINE_TEMP_SENSOR(noheater, TT_INTERCOM, 0)
*/
#define STEP_INTERRUPT_INTERRUPTIBLE 1
-/*
- how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535)
-*/
-#define TICK_TIME 2 MS
-#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000))
-
/*
temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop
higher values make PID derivative term more stable at the expense of reaction time
View
@@ -357,12 +357,6 @@ DEFINE_HEATER(extruder, PORTD, PIND6, OCR2B)
*/
#define STEP_INTERRUPT_INTERRUPTIBLE 1
-/*
- how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535)
-*/
-#define TICK_TIME 2 MS
-#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000))
-
/*
temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop
higher values make PID derivative term more stable at the expense of reaction time
View
@@ -385,12 +385,6 @@ DEFINE_HEATER(bed, PORTB, PINB4, OCR0B)
*/
#define STEP_INTERRUPT_INTERRUPTIBLE 1
-/*
- how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535)
-*/
-#define TICK_TIME 2 MS
-#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000))
-
/*
temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop
higher values make PID derivative term more stable at the expense of reaction time
View
@@ -371,12 +371,6 @@ DEFINE_HEATER(fan, PORTH, PINH6, OCR2B)
*/
#define STEP_INTERRUPT_INTERRUPTIBLE 1
-/*
- how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535)
-*/
-#define TICK_TIME 2 MS
-#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000))
-
/*
temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop
higher values make PID derivative term more stable at the expense of reaction time
View
@@ -4,6 +4,12 @@
#include "dda_queue.h"
+/*
+ how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535)
+*/
+#define TICK_TIME 2 MS
+#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000))
+
volatile uint32_t next_step_time;
uint8_t clock_counter_10ms = 0;

0 comments on commit 4ca9e47

Please sign in to comment.