From 11519bf84cc04bccd1c0fec63816411d244a568f Mon Sep 17 00:00:00 2001 From: Hyeongsik Min Date: Thu, 25 May 2017 19:09:51 +0900 Subject: [PATCH] Fix to handle OUT_HIGH in gpio set direction Change-Id: I3d76dafa2ef5c9aaee123ffc04e2a62a54b7c7fe Signed-off-by: Hyeongsik Min --- src/interface/gpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/interface/gpio.c b/src/interface/gpio.c index 7e689b3..40901e8 100644 --- a/src/interface/gpio.c +++ b/src/interface/gpio.c @@ -69,9 +69,11 @@ int gpio_set_direction(int gpiopin, gpio_direction_e dir) } if (dir == GPIO_DIRECTION_OUT) - status = write(fd, "out", strlen("out")+1); + status = write(fd, "low", strlen("low")+1); else if (dir == GPIO_DIRECTION_IN) status = write(fd, "in", strlen("in")+1); + else if (dir == GPIO_DIRECTION_OUT_HIGH) + status = write(fd, "high", strlen("high")+1); else { close(fd); _E("Error: gpio direction is wrong\n"); -- 2.7.4