From 3380de4adf508be460e7ff7d2efa63eb45c412ad Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 16 Sep 2020 22:45:19 +0200 Subject: [PATCH] software/bios/cmds/cmd_i2c: rename commands to i2c_xy. --- litex/soc/software/bios/cmds/cmd_i2c.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/litex/soc/software/bios/cmds/cmd_i2c.c b/litex/soc/software/bios/cmds/cmd_i2c.c index 6c53b76cc..de66ee120 100644 --- a/litex/soc/software/bios/cmds/cmd_i2c.c +++ b/litex/soc/software/bios/cmds/cmd_i2c.c @@ -12,30 +12,30 @@ /** - * Command "i2creset" + * Command "i2c_reset" * * Reset I2C line state in case a slave locks the line. * */ #ifdef CSR_I2C_BASE -define_command(i2creset, i2c_reset, "Reset I2C line state", I2C_CMDS); +define_command(i2c_reset, i2c_reset, "Reset I2C line state", I2C_CMDS); #endif /** - * Command "i2cwr" + * Command "i2c_write" * * Write I2C slave memory using 7-bit slave address and 8-bit memory address. * */ #ifdef CSR_I2C_BASE -static void i2cwr_handler(int nb_params, char **params) +static void i2c_write_handler(int nb_params, char **params) { int i; char *c; unsigned char write_params[32]; // also indirectly limited by CMD_LINE_BUFFER_SIZE if (nb_params < 2) { - printf("i2cwr [, ...]"); + printf("i2c_write [, ...]"); return; } @@ -57,7 +57,7 @@ static void i2cwr_handler(int nb_params, char **params) return; } } -define_command(i2cwr, i2cwr_handler, "Write over I2C", I2C_CMDS); +define_command(i2c_write, i2c_write_handler, "Write over I2C", I2C_CMDS); #endif /** @@ -67,7 +67,7 @@ define_command(i2cwr, i2cwr_handler, "Write over I2C", I2C_CMDS); * */ #ifdef CSR_I2C_BASE -static void i2crd_handler(int nb_params, char **params) +static void i2c_read_handler(int nb_params, char **params) { char *c; int len; @@ -76,7 +76,7 @@ static void i2crd_handler(int nb_params, char **params) bool send_stop = true; if (nb_params < 3) { - printf("i2crd []"); + printf("i2c_read []"); return; } @@ -117,5 +117,5 @@ static void i2crd_handler(int nb_params, char **params) dump_bytes((unsigned int *) buf, len, addr); } -define_command(i2crd, i2crd_handler, "Read over I2C", I2C_CMDS); +define_command(i2c_read, i2c_read_handler, "Read over I2C", I2C_CMDS); #endif