From: qwert Date: Fri, 25 Jul 2008 14:48:53 +0000 (+0000) Subject: Add code that fix timeout problem while the triface tag is acquiring data. X-Git-Tag: 2.0.0~418 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0230e8971b9260d8c0ca00482856d07de1b7c290;p=bertos.git Add code that fix timeout problem while the triface tag is acquiring data. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1516 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/net/keytag.c b/bertos/net/keytag.c index 68b51997..de890de3 100644 --- a/bertos/net/keytag.c +++ b/bertos/net/keytag.c @@ -63,10 +63,9 @@ void keytag_init(struct TagPacket *pkt, struct KFile *comm, struct KFile *tag) keytag_clearPkt(pkt); pkt->host = comm; pkt->tag = tag; - } - void keytag_poll(struct TagPacket *pkt) +void keytag_poll(struct TagPacket *pkt) { int c; @@ -112,4 +111,11 @@ void keytag_init(struct TagPacket *pkt, struct KFile *comm, struct KFile *tag) } } } + if (kfile_error(pkt->tag) != 0) + { + if (kfile_error(pkt->tag) != SERRF_RXTIMEOUT) + kprintf("Error %08x\n", kfile_error(pkt->tag)); + kfile_clearerr(pkt->tag); + } + }