diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-07-16 15:10:11 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-20 23:09:18 +0000 |
commit | 473bd883b60fd5b00377766dae2bacad246de0d2 (patch) | |
tree | 992d9f03104277934c22c869eceb634e2cf5f7ec /chip/nrf51 | |
parent | 053491b560d2c4e374bb739373d8ae25c41f6315 (diff) | |
download | chrome-ec-473bd883b60fd5b00377766dae2bacad246de0d2.tar.gz |
Remove __7b, __8b and __7bf
The extentions were added to make the compiler perform most
of the verification that the conversion was being done correctly
to remove 8bit addressing as the standard I2C/SPI address type.
Now that the compiler has verified the code, the extra
extentions are being removed
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
TEST=verify sensor functionality on arcada_ish
Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/nrf51')
-rw-r--r-- | chip/nrf51/i2c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chip/nrf51/i2c.c b/chip/nrf51/i2c.c index 7f4903ee1b..ab20b2a16b 100644 --- a/chip/nrf51/i2c.c +++ b/chip/nrf51/i2c.c @@ -141,13 +141,13 @@ static void handle_i2c_error(int port, int rv) i2c_recover(port); } -static int i2c_master_write__7bf(const int port, const uint16_t slave_addr__7bf, +static int i2c_master_write(const int port, const uint16_t slave_addr_flags, const uint8_t *data, int size, int stop) { int bytes_sent; int timeout = I2C_TIMEOUT; - NRF51_TWI_ADDRESS__7b(port) = I2C_GET_ADDR__7b(slave_addr__7bf); + NRF51_TWI_ADDRESS(port) = I2C_GET_ADDR(slave_addr_flags); /* Clear the sent bit */ NRF51_TWI_TXDSENT(port) = 0; @@ -187,13 +187,13 @@ static int i2c_master_write__7bf(const int port, const uint16_t slave_addr__7bf, return EC_SUCCESS; } -static int i2c_master_read__7bf(const int port, const uint16_t slave__addr__7bf, +static int i2c_master_read(const int port, const uint16_t slave_addr_flags, uint8_t *data, int size) { int curr_byte; int timeout = I2C_TIMEOUT; - NRF51_TWI_ADDRESS__7b(port) = I2C_GET_ADDR__7b(slave_addr__7bf); + NRF51_TWI_ADDRESS(port) = I2C_GET_ADDR(slave_addr_flags); if (size == 1) /* Last byte: stop after this one. */ NRF51_PPI_TEP(i2c_ppi_chan[port]) = @@ -253,7 +253,7 @@ static int i2c_master_read__7bf(const int port, const uint16_t slave__addr__7bf, return EC_SUCCESS; } -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) { @@ -263,11 +263,11 @@ int chip_i2c_xfer__7bf(const int port, const uint16_t slave_addr__7bf, ASSERT(in || !in_bytes); if (out_bytes) - rv = i2c_master_write__7bf(port, slave_addr__7bf, + rv = i2c_master_write(port, slave_addr_flags, out, out_bytes, in_bytes ? 0 : 1); if (rv == EC_SUCCESS && in_bytes) - rv = i2c_master_read__7bf(port, slave_addr__7bf, + rv = i2c_master_read(port, slave_addr_flags, in, in_bytes); handle_i2c_error(port, rv); |