From e0757be126d70c7e34be6b1b81894cbc270e138c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 14 Feb 2021 10:53:43 +0100 Subject: arduino-nano/i2c: add missing return, remove unused variable --- src/arch/arduino-nano/driver/i2c.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/arch/arduino-nano/driver/i2c.cc b/src/arch/arduino-nano/driver/i2c.cc index dbfb33b..cbf462b 100644 --- a/src/arch/arduino-nano/driver/i2c.cc +++ b/src/arch/arduino-nano/driver/i2c.cc @@ -64,6 +64,7 @@ static signed char i2c_start_write(unsigned char addr) static signed char i2c_stop() { TWCR = _BV(TWINT) | _BV(TWSTO) | _BV(TWEN); + return 0; } /* @@ -128,8 +129,6 @@ signed char I2C::xmit(unsigned char address, unsigned char tx_len, unsigned char *tx_buf, unsigned char rx_len, unsigned char *rx_buf) { - unsigned char i; - if (tx_len) { if (i2c_start_write(address) < 0) { return -1; -- cgit v1.2.3