summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-02-14 10:53:43 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-02-14 10:53:43 +0100
commite0757be126d70c7e34be6b1b81894cbc270e138c (patch)
tree1b232807316dfd4c06139ecbd70e86d751f07d1a /src/arch
parent09a4248c50708c1e54d32b3a260112d29ea268c1 (diff)
arduino-nano/i2c: add missing return, remove unused variable
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arduino-nano/driver/i2c.cc3
1 files changed, 1 insertions, 2 deletions
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;