diff options
author | Jakob Kaivo <jakob@kaivo.net> | 2018-11-10 16:20:51 -0500 |
---|---|---|
committer | Jakob Kaivo <jakob@kaivo.net> | 2018-11-10 16:20:51 -0500 |
commit | 4a418eac71a348e0fc06abcf7938c217b2085ddf (patch) | |
tree | e32bcd38760caadbd1403fa7bbb35e9b7ced9688 | |
parent | 9356468e9675a044eab70095b25869e92cf30f47 (diff) |
fix incorrect strings
-rw-r--r-- | gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -10,8 +10,8 @@ #define GPIO_EXPORT GPIO_BASEDIR "/export" #define GPIO_IN "in" -#define GPIO_INIT_LOW "GPIO_INIT_LOW" -#define GPIO_INIT_HIGH "GPIO_INIT_HIGH" +#define GPIO_INIT_LOW "low" +#define GPIO_INIT_HIGH "high" static int gpio_open(int port, const char *field, int flags) { @@ -50,7 +50,7 @@ static void gpio_enable(int export_fd, int port, const char *state) { dprintf(export_fd, "%d", port); int fd = gpio_open(port, "direction", O_WRONLY); - write(fd, "state", strlen(state)); + write(fd, "direction", strlen(state)); close(fd); } |