projects
/
sball
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
detection works
[sball]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
7fe32c5
..
04b0ace
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-2,15
+2,15
@@
#include <stdlib.h>
#include "sball.h"
#include <stdlib.h>
#include "sball.h"
-static int fd;
+static struct sball *sb;
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
- if(!(fd = sball_open(argv[1] ? argv[1] : "/dev/ttyS0"))) {
+ if(!(sb = sball_open(argv[1] ? argv[1] : "/dev/ttyS0"))) {
fprintf(stderr, "Failed to open spaceball at %s\n", argv[1] ? argv[1] : "/dev/ttyS0");
return 1;
}
fprintf(stderr, "Failed to open spaceball at %s\n", argv[1] ? argv[1] : "/dev/ttyS0");
return 1;
}
- sball_close(fd);
+ sball_close(sb);
return 0;
}
return 0;
}