Skip to content
Snippets Groups Projects
Commit e0757be1 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

arduino-nano/i2c: add missing return, remove unused variable

parent 09a4248c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment