aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-03-17 21:07:31 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-03-17 21:07:31 -0400
commit53290664ee685c06c28a8e36aa06ace6a656ed93 (patch)
tree56bf6299f7ad56010bb23bec8702e2ffed1f09d5
parent4a35f927fc1d7b8c3b34f32c1c889fb433752dcc (diff)
downloadkutter-53290664ee685c06c28a8e36aa06ace6a656ed93.tar.gz
kutter-53290664ee685c06c28a8e36aa06ace6a656ed93.tar.xz
kutter-53290664ee685c06c28a8e36aa06ace6a656ed93.zip
pins: Document support for '~' to enable pull-down resistors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--config/example.cfg12
-rw-r--r--klippy/pins.py2
2 files changed, 8 insertions, 6 deletions
diff --git a/config/example.cfg b/config/example.cfg
index 3468caeb..a692a6f6 100644
--- a/config/example.cfg
+++ b/config/example.cfg
@@ -11,11 +11,13 @@
# A note on pin names: pins may be configured with a hardware name
# (such as "PA4") or with an Arduino alias name (such as "ar29" or
# "analog3"). In order to use Arduino names, the pin_map variable in
-# the mcu section must be present and have a value of "arduino".
-# Pin names may be preceded by an '!' to indicate that a reverse
-# polarity should be used (eg, trigger on low instead of high). Input
-# pins may be preceded by a '^' to indicate that a hardware pull-up
-# resistor should be enabled for the pin.
+# the mcu section must be present and have a value of "arduino". Pin
+# names may be preceded by an '!' to indicate that a reverse polarity
+# should be used (eg, trigger on low instead of high). Input pins may
+# be preceded by a '^' to indicate that a hardware pull-up resistor
+# should be enabled for the pin. If the micro-controller supports
+# pull-down resistors then an input pin may alternatively be preceded
+# by a '~'.
# The stepper_x section is used to describe the stepper controlling
diff --git a/klippy/pins.py b/klippy/pins.py
index 683285f7..f764b414 100644
--- a/klippy/pins.py
+++ b/klippy/pins.py
@@ -183,7 +183,7 @@ class PrinterPins:
if [c for c in '^~!: ' if c in pin]:
format = ""
if can_pullup:
- format += "[^] "
+ format += "[^~] "
if can_invert:
format += "[!] "
raise error("Invalid pin description '%s'\n"