Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 4ca9e470a5bb7f5549358b301350bf0ff2498a55 1 parent 2c53dbe
@Traumflug Traumflug authored
View
6 config.gen3.h
@@ -369,12 +369,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
6 config.gen6.h
@@ -358,12 +358,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
6 config.h.dist
@@ -386,12 +386,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
6 config.ramps.h
@@ -372,12 +372,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
6 timer.c
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.