From a58cb79a8be6ba9a127713ba573fea20118a8d0b Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Thu, 1 Aug 2019 13:08:53 +0200 Subject: [PATCH] Use combined i2c_gpio driver --- Makefile | 2 +- src/main.c | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index e214b0f..408b484 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ INCLUDES := inc INCLUDES += $(PREFIX)/include/ INCLUDES += $(EXTRA_INC) -LIBS = ads1115 i2c_bb gpio_sys +LIBS = ads1115 i2c_bb LD_FLAGS += $(addprefix -L,$(EXTRA_LIB_DIR)) diff --git a/src/main.c b/src/main.c index 895216a..19bcf67 100644 --- a/src/main.c +++ b/src/main.c @@ -7,22 +7,11 @@ #include #include -#include #include -static struct gpio_sys gpio_sda = { - .pin = 4, - .direction = 1, -}; - -static struct gpio_sys gpio_scl = { - .pin = 24, - .direction = 1, -}; - static struct i2c_bb i2c_dev = { - .sda = &gpio_sda, - .scl = &gpio_scl, + .pin_sda = 4, + .pin_scl = 24, }; static struct ads1115_dev ads = {