aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/tmc_uart.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/tmc_uart.py')
-rw-r--r--klippy/extras/tmc_uart.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/klippy/extras/tmc_uart.py b/klippy/extras/tmc_uart.py
index 288fb76d..f5584e8b 100644
--- a/klippy/extras/tmc_uart.py
+++ b/klippy/extras/tmc_uart.py
@@ -149,8 +149,10 @@ class MCU_TMC_uart_bitbang:
params = self.tmcuart_send_cmd.send_with_response(
[self.oid, msg, 10], 'tmcuart_response', self.oid)
return self._decode_read(reg, params['read'])
- def reg_write(self, instance_id, addr, reg, val, print_time=0.):
- minclock = self.mcu.print_time_to_clock(print_time)
+ def reg_write(self, instance_id, addr, reg, val, print_time=None):
+ minclock = 0
+ if print_time is not None:
+ minclock = self.mcu.print_time_to_clock(print_time)
if self.analog_mux is not None:
self.analog_mux.activate(instance_id)
msg = self._encode_write(0xf5, 0x00, reg | 0x80, val)