git://git.jankratochvil.net
/
lptgpib.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
+terminal
[lptgpib.git]
/
sniff.c
1
#include <stdio.h>
2
#include "lptgpib.h"
3
4
int main(int argc, char **argv){
5
lptgpib_init(0x378);
6
7
char buf[1024];
8
while (1) {
9
char val, flags;
10
val = lptgpib_read_byte(&flags);
11
if ( (flags & ATN) &&
12
((val > MTA && val <= MTA + 30) ||
13
(val > MLA && val <= MLA + 30)) )
14
lptgpib_read_data(buf, sizeof(buf));
15
printf("%s\n", buf);
16
}
17
}