projects
/
rfid
/
librfid.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
411df5c
)
minr modifications
author
hackbard
<hackbard>
Mon, 27 Feb 2006 18:57:52 +0000
(18:57 +0000)
committer
hackbard
<hackbard>
Mon, 27 Feb 2006 18:57:52 +0000
(18:57 +0000)
gemtag/gemtag.c
patch
|
blob
|
history
diff --git
a/gemtag/gemtag.c
b/gemtag/gemtag.c
index
bca97eb
..
7a2e8ce
100644
(file)
--- a/
gemtag/gemtag.c
+++ b/
gemtag/gemtag.c
@@
-107,7
+107,8
@@
int gemtag_transcieve(struct gemtag_handle *gh,unsigned char cmd,
/* usb write */
printf("-> ");
hexdump(txbuf,size);
/* usb write */
printf("-> ");
hexdump(txbuf,size);
- usb_clear_halt(gh->handle,0x02);
+ if(usb_clear_halt(gh->handle,0x02))
+ perror("clear halt (out)");
ret=usb_bulk_write(gh->handle,0x02,txbuf,size,0);
if(ret<=0) {
perror("usb bulk write");
ret=usb_bulk_write(gh->handle,0x02,txbuf,size,0);
if(ret<=0) {
perror("usb bulk write");
@@
-115,14
+116,15
@@
int gemtag_transcieve(struct gemtag_handle *gh,unsigned char cmd,
}
/* usb read */
}
/* usb read */
- usb_clear_halt(gh->handle,0x81);
+ if(usb_clear_halt(gh->handle,0x81))
+ perror("clear halt (in)");
ret=usb_bulk_read(gh->handle,0x81,rxbuf,sizeof(rxbuf),0);
size=ret;
if(ret<=0) {
perror("usb bulk read");
return ret;
}
ret=usb_bulk_read(gh->handle,0x81,rxbuf,sizeof(rxbuf),0);
size=ret;
if(ret<=0) {
perror("usb bulk read");
return ret;
}
- printf("
->
");
+ printf("
<-
");
hexdump(rxbuf,ret);
if(rxhdr->seq!=txhdr->seq)
hexdump(rxbuf,ret);
if(rxhdr->seq!=txhdr->seq)