aboutsummaryrefslogtreecommitdiffstats
path: root/src/Kconfig
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-01-09 13:10:23 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-01-09 13:16:42 -0500
commit2ea7c97bbd3680949a2d89c3c9ab3a2552a25b4b (patch)
tree8ef71fd0ed030b1a52b6246aea5dccc5c72c2ce0 /src/Kconfig
parentc0ea0312e548afe1de8a34a59b179db4ead63f36 (diff)
downloadkutter-2ea7c97bbd3680949a2d89c3c9ab3a2552a25b4b.tar.gz
kutter-2ea7c97bbd3680949a2d89c3c9ab3a2552a25b4b.tar.xz
kutter-2ea7c97bbd3680949a2d89c3c9ab3a2552a25b4b.zip
stepper: Support configuring the stepper pulse length from Kconfig
Allow the stepper pulse length to be configured at compile time from the Kconfig menu system. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/Kconfig')
-rw-r--r--src/Kconfig37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/Kconfig b/src/Kconfig
index e94ff5b2..16ce3531 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -2,6 +2,13 @@
mainmenu "Klipper Firmware Configuration"
+config LOW_LEVEL_OPTIONS
+ bool "Enable extra low-level configuration options"
+ default n
+ help
+ Enable low-level configuration options that (if modified) may
+ result in a build that does not function correctly.
+
choice
prompt "Micro-controller Architecture"
config MACH_AVR
@@ -32,6 +39,29 @@ source "src/linux/Kconfig"
source "src/simulator/Kconfig"
+# Step timing customization
+config CUSTOM_STEP_DELAY
+ bool "Specify a custom step pulse duration"
+ depends on LOW_LEVEL_OPTIONS
+config STEP_DELAY
+ int
+ default 2
+config STEP_DELAY
+ int "Step pulse duration (in microseconds)"
+ depends on CUSTOM_STEP_DELAY
+ help
+ Specify the duration of the stepper step pulse time. This
+ setting applies to all stepper drivers controlled by the
+ micro-controller. If this value is set to zero then the code
+ will "step" and "unstep" in the same C function.
+
+ The default is zero for 8-bit AVR based micro-controllers, as
+ it takes a little over 2us to step and unstep with this
+ setting.
+
+ The default for all other micro-controllers is 2us.
+
+ CUSTOMIZING THIS VALUE DOES NOT IMPROVE PERFORMANCE!
# The HAVE_GPIO_x options allow boards to disable support for some
# commands if the hardware does not support the feature.
@@ -54,13 +84,6 @@ config HAVE_GPIO_BITBANGING
bool
default n
-config NO_UNSTEP_DELAY
- # Slow micro-controllers do not require a delay before returning a
- # stepper step pin to its default level. A board can enable this
- # option to optimize the stepper_event() handler in this case.
- bool
- default n
-
config INLINE_STEPPER_HACK
# Enables gcc to inline stepper_event() into the main timer irq handler
bool