summaryrefslogtreecommitdiff
path: root/chip/stm32/i2c-stm32l.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/i2c-stm32l.c')
-rw-r--r--chip/stm32/i2c-stm32l.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/chip/stm32/i2c-stm32l.c b/chip/stm32/i2c-stm32l.c
index d56d78d8eb..02d842d75c 100644
--- a/chip/stm32/i2c-stm32l.c
+++ b/chip/stm32/i2c-stm32l.c
@@ -98,7 +98,7 @@ static int wait_sr1(int port, int mask)
*
* @return Non-zero if error.
*/
-static int send_start__8b(int port, uint16_t slave_addr__8b)
+static int send_start(int port, uint16_t slave_addr_8bit)
{
int rv;
@@ -110,7 +110,7 @@ static int send_start__8b(int port, uint16_t slave_addr__8b)
return I2C_ERROR_FAILED_START;
/* Write slave address */
- STM32_I2C_DR(port) = slave_addr__8b & 0xff;
+ STM32_I2C_DR(port) = slave_addr_8bit & 0xff;
rv = wait_sr1(port, STM32_I2C_SR1_ADDR);
if (rv)
return rv;
@@ -164,12 +164,12 @@ static void i2c_init_port(const struct i2c_port_t *p)
/*****************************************************************************/
/* Interface */
-int chip_i2c_xfer__7bf(const int port,
- const uint16_t slave_addr__7bf,
+int chip_i2c_xfer(const int port,
+ const uint16_t slave_addr_flags,
const uint8_t *out, int out_bytes,
uint8_t *in, int in_bytes, int flags)
{
- int addr__8b == I2C_GET_ADDR__7b(slave_addr__7bf) << 1;
+ int addr_8bit == I2C_GET_ADDR(slave_addr_flags) << 1;
int started = (flags & I2C_XFER_START) ? 0 : 1;
int rv = EC_SUCCESS;
int i;
@@ -196,7 +196,7 @@ int chip_i2c_xfer__7bf(const int port,
/* No out bytes and no in bytes means just check for active */
if (out_bytes || !in_bytes) {
if (!started) {
- rv = send_start__8b(port, addr__8b);
+ rv = send_start(port, addr_8bit);
if (rv)
goto xfer_exit;
}
@@ -228,7 +228,7 @@ int chip_i2c_xfer__7bf(const int port,
STM32_I2C_CR1(port) |= STM32_I2C_CR1_ACK;
if (!started) {
- rv = send_start__8b(port, addr__8b | 0x01);
+ rv = send_start(port, addr_8bit | 0x01);
if (rv)
goto xfer_exit;
}