test: Add test cases for tmc drivers

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-06-05 17:33:15 -04:00
committed by KevinOConnor
parent 700e35c6ac
commit 5de9f74525
5 changed files with 132 additions and 0 deletions

View File

@@ -225,6 +225,8 @@ class TMC2660:
def get_response(self):
reg = Registers["DRVCTRL"]
val = self.regs["DRVCTRL"]
if self.printer.get_start_args().get('debugoutput') is not None:
return 0
params = self.spi.spi_transfer([((val >> 16) | reg) & 0xff,
(val >> 8) & 0xff, val & 0xff])
pr = bytearray(params['response'])