diff --git a/src/i2c.c b/src/i2c.c index ca9ac3b..4ef73a8 100644 --- a/src/i2c.c +++ b/src/i2c.c @@ -19,7 +19,7 @@ int i2c_open(const struct i2c_bb *i2c) assert(NULL != i2c); res = gpio_open(i2c->sda); - res |= gpio_open(i2c->sda); + res |= gpio_open(i2c->scl); return res; } @@ -31,7 +31,7 @@ int i2c_close(const struct i2c_bb *i2c) assert(NULL != i2c); res = gpio_close(i2c->sda); - res |= gpio_close(i2c->sda); + res |= gpio_close(i2c->scl); return res; }