From 0230e8971b9260d8c0ca00482856d07de1b7c290 Mon Sep 17 00:00:00 2001 From: qwert Date: Fri, 25 Jul 2008 14:48:53 +0000 Subject: [PATCH] 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 --- bertos/net/keytag.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); + } + } -- 2.25.1