tmc: Add support for virtual enable pins

Add support for enabling the stepper via the communication channel.
This improves support for boards with a shared enable line.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-06-12 23:28:22 -04:00
committed by KevinOConnor
parent 041831f93a
commit 7702f0a027
7 changed files with 67 additions and 18 deletions

View File

@@ -187,6 +187,8 @@ class TMC2208:
# Setup mcu communication
self.fields = tmc.FieldHelper(Fields, SignedFields, FieldFormatters)
self.mcu_tmc = tmc_uart.MCU_TMC_uart(config, Registers, self.fields)
# Allow virtual pins to be created
tmc.TMCVirtualPinHelper(config, self.mcu_tmc)
# Register commands
cmdhelper = tmc.TMCCommandHelper(config, self.mcu_tmc)
cmdhelper.setup_register_dump(ReadRegisters, self.read_translate)