From fe1d96853cf4259e4263cb9f0b171c1040ec6c51 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Mon, 22 Jul 2019 17:27:46 +0200 Subject: [PATCH] Fix: Open/clode correct gpio's. --- src/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }