diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-06-07 22:12:06 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-06-07 22:12:06 +0100 |
| commit | d3e5a559e4d53ce7c48e7eee60d2dd8928f012a8 (patch) | |
| tree | 3e704df06d43a9ad6d62e2fd074165719cbc300f /src/overo_gpioout.c | |
| parent | 72da9194a40d1d50f81740a4cd22739fe4caa009 (diff) | |
fixed direction bug output
Diffstat (limited to 'src/overo_gpioout.c')
| -rw-r--r-- | src/overo_gpioout.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
