From 4c3d50693ee37f82ff2edad6a9779bcfd56fca1a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 31 Mar 2019 19:43:16 -0400 Subject: [PATCH] bus: Change bus parameter in config_spi/config_i2c Be explicit when using an spi_bus vs i2c_bus in the parameter name. Signed-off-by: Kevin O'Connor --- klippy/extras/bus.py | 6 +++--- src/i2ccmds.c | 2 +- src/spicmds.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/klippy/extras/bus.py b/klippy/extras/bus.py index 7c7a4454..fa60335c 100644 --- a/klippy/extras/bus.py +++ b/klippy/extras/bus.py @@ -31,12 +31,12 @@ class MCU_SPI: self.oid, software_spi_oid, pin, shutdown_msg)] elif pin is None: self.config_msgs = [ - "config_spi_without_cs oid=%d bus=%d mode=%d rate=%d" + "config_spi_without_cs oid=%d spi_bus=%d mode=%d rate=%d" " shutdown_msg=%s" % ( self.oid, bus, mode, speed, shutdown_msg)] else: self.config_msgs = [ - "config_spi oid=%d bus=%d pin=%s mode=%d rate=%d" + "config_spi oid=%d spi_bus=%d pin=%s mode=%d rate=%d" " shutdown_msg=%s" % ( self.oid, bus, pin, mode, speed, shutdown_msg)] self.cmd_queue = self.mcu.alloc_command_queue() @@ -111,7 +111,7 @@ class MCU_I2C: self.i2c_address = addr self.oid = self.mcu.create_oid() self.mcu.add_config_cmd( - "config_i2c oid=%d bus=%d rate=%d address=%d" % ( + "config_i2c oid=%d i2c_bus=%d rate=%d address=%d" % ( self.oid, bus, speed, addr)) self.cmd_queue = self.mcu.alloc_command_queue() self.mcu.register_config_callback(self.build_config) diff --git a/src/i2ccmds.c b/src/i2ccmds.c index 01f7b36f..d518c666 100644 --- a/src/i2ccmds.c +++ b/src/i2ccmds.c @@ -22,7 +22,7 @@ command_config_i2c(uint32_t *args) i2c->i2c_config = i2c_setup(args[1], args[2], addr); } DECL_COMMAND(command_config_i2c, - "config_i2c oid=%c bus=%u rate=%u address=%u"); + "config_i2c oid=%c i2c_bus=%u rate=%u address=%u"); void command_i2c_write(uint32_t *args) diff --git a/src/spicmds.c b/src/spicmds.c index 34628ddd..527cb0af 100644 --- a/src/spicmds.c +++ b/src/spicmds.c @@ -44,7 +44,7 @@ command_config_spi(uint32_t *args) memcpy(spi->shutdown_msg, shutdown_msg, shutdown_msg_len); } DECL_COMMAND(command_config_spi, - "config_spi oid=%c bus=%u pin=%u mode=%u rate=%u" + "config_spi oid=%c spi_bus=%u pin=%u mode=%u rate=%u" " shutdown_msg=%*s"); void @@ -61,7 +61,7 @@ command_config_spi_without_cs(uint32_t *args) memcpy(spi->shutdown_msg, shutdown_msg, shutdown_msg_len); } DECL_COMMAND(command_config_spi_without_cs, - "config_spi_without_cs oid=%c bus=%u mode=%u rate=%u" + "config_spi_without_cs oid=%c spi_bus=%u mode=%u rate=%u" " shutdown_msg=%*s"); void