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 <kevin@koconnor.net>
This commit is contained in:
parent
be6b29fabf
commit
4c3d50693e
|
@ -31,12 +31,12 @@ class MCU_SPI:
|
||||||
self.oid, software_spi_oid, pin, shutdown_msg)]
|
self.oid, software_spi_oid, pin, shutdown_msg)]
|
||||||
elif pin is None:
|
elif pin is None:
|
||||||
self.config_msgs = [
|
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" % (
|
" shutdown_msg=%s" % (
|
||||||
self.oid, bus, mode, speed, shutdown_msg)]
|
self.oid, bus, mode, speed, shutdown_msg)]
|
||||||
else:
|
else:
|
||||||
self.config_msgs = [
|
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" % (
|
" shutdown_msg=%s" % (
|
||||||
self.oid, bus, pin, mode, speed, shutdown_msg)]
|
self.oid, bus, pin, mode, speed, shutdown_msg)]
|
||||||
self.cmd_queue = self.mcu.alloc_command_queue()
|
self.cmd_queue = self.mcu.alloc_command_queue()
|
||||||
|
@ -111,7 +111,7 @@ class MCU_I2C:
|
||||||
self.i2c_address = addr
|
self.i2c_address = addr
|
||||||
self.oid = self.mcu.create_oid()
|
self.oid = self.mcu.create_oid()
|
||||||
self.mcu.add_config_cmd(
|
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.oid, bus, speed, addr))
|
||||||
self.cmd_queue = self.mcu.alloc_command_queue()
|
self.cmd_queue = self.mcu.alloc_command_queue()
|
||||||
self.mcu.register_config_callback(self.build_config)
|
self.mcu.register_config_callback(self.build_config)
|
||||||
|
|
|
@ -22,7 +22,7 @@ command_config_i2c(uint32_t *args)
|
||||||
i2c->i2c_config = i2c_setup(args[1], args[2], addr);
|
i2c->i2c_config = i2c_setup(args[1], args[2], addr);
|
||||||
}
|
}
|
||||||
DECL_COMMAND(command_config_i2c,
|
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
|
void
|
||||||
command_i2c_write(uint32_t *args)
|
command_i2c_write(uint32_t *args)
|
||||||
|
|
|
@ -44,7 +44,7 @@ command_config_spi(uint32_t *args)
|
||||||
memcpy(spi->shutdown_msg, shutdown_msg, shutdown_msg_len);
|
memcpy(spi->shutdown_msg, shutdown_msg, shutdown_msg_len);
|
||||||
}
|
}
|
||||||
DECL_COMMAND(command_config_spi,
|
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");
|
" shutdown_msg=%*s");
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -61,7 +61,7 @@ command_config_spi_without_cs(uint32_t *args)
|
||||||
memcpy(spi->shutdown_msg, shutdown_msg, shutdown_msg_len);
|
memcpy(spi->shutdown_msg, shutdown_msg, shutdown_msg_len);
|
||||||
}
|
}
|
||||||
DECL_COMMAND(command_config_spi_without_cs,
|
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");
|
" shutdown_msg=%*s");
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue