From d3e5a559e4d53ce7c48e7eee60d2dd8928f012a8 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 7 Jun 2012 22:12:06 +0100 Subject: fixed direction bug output --- src/overo_gpioout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/overo_gpioout.c b/src/overo_gpioout.c index aefed97..260308b 100644 --- a/src/overo_gpioout.c +++ b/src/overo_gpioout.c @@ -82,7 +82,7 @@ void *overo_gpioout_new(t_floatarg f) char dirfile[35]; sprintf(dirfile,"/sys/class/gpio/gpio%d/direction",x->gpioNum); x->fs = fopen(dirfile, "w" ); - t=fwrite( "out", sizeof(char), 3, x->fs ); + t=fwrite( "out", sizeof(char), 4, x->fs ); fclose(x->fs); //if (( @@ -92,7 +92,7 @@ void *overo_gpioout_new(t_floatarg f) // error( "Unable to open outfile" ); // exit( 1 ); //} - t=fwrite( "0", sizeof(char), 1, x->fs ); + t=fwrite( '0', sizeof(char), 1, x->fs ); x->set=0; fclose(x->fs); return (void *)x; -- cgit v1.2.3