mcu: Rename add_config_object() to register_config_callback()
Change the name of the config registration method and pass an explicit reference to the callback to the new method. This makes the relationship between mcu registration and build_config() more clear in the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -38,7 +38,7 @@ class TMC2130:
|
||||
"config_spi oid=%d bus=%d pin=%s mode=%d rate=%d shutdown_msg=" % (
|
||||
self.oid, 0, cs_pin_params['pin'], 3, 4000000))
|
||||
self.spi_send_cmd = self.spi_transfer_cmd = None
|
||||
self.mcu.add_config_object(self)
|
||||
self.mcu.register_config_callback(self.build_config)
|
||||
# Allow virtual endstop to be created
|
||||
self.diag1_pin = config.get('diag1_pin', None)
|
||||
ppins.register_chip("tmc2130_" + self.name, self)
|
||||
|
||||
Reference in New Issue
Block a user