tmc2130: Transmit register initialization during connect callback

Perform the register initialization directly from TMCCommandHelper and
perform it during the "connect" phase.  This unifies the register
setup for the TMC2130, TMC2208, TMC2660, and TMC5160.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-06-05 17:24:10 -04:00 committed by KevinOConnor
parent 6947548c17
commit 6abe132cf0
4 changed files with 9 additions and 19 deletions

View file

@ -320,8 +320,6 @@ class TMC5160:
self.fields.set_field("TPWMTHRS", thresh)
# TPOWERDOWN
set_config_field(config, "TPOWERDOWN", 10)
cmdhelper.init_registers()
def setup_pin(self, pin_type, pin_params):
if pin_type != 'endstop' or pin_params['pin'] != 'virtual_endstop':
raise pins.error("tmc5160 virtual endstop only useful as endstop")