tmc.py: add track of stallguard

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
Timofey Titovets
2024-05-15 02:37:58 +02:00
committed by KevinOConnor
parent 9c0d0f6a72
commit 317f8c94c8
4 changed files with 102 additions and 0 deletions

View File

@@ -232,6 +232,8 @@ class MCU_TMC_SPI_chain:
pr = pr[(self.chain_len - chain_pos) * 5 :
(self.chain_len - chain_pos + 1) * 5]
return (pr[1] << 24) | (pr[2] << 16) | (pr[3] << 8) | pr[4]
def get_mcu(self):
return self.spi.get_mcu()
# Helper to setup an spi daisy chain bus from settings in a config section
def lookup_tmc_spi_chain(config):
@@ -292,6 +294,8 @@ class MCU_TMC_SPI:
"Unable to write tmc spi '%s' register %s" % (self.name, reg_name))
def get_tmc_frequency(self):
return self.tmc_frequency
def get_mcu(self):
return self.tmc_spi.get_mcu()
######################################################################