summaryrefslogtreecommitdiff
path: root/common/xyzModem.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/xyzModem.c')
-rw-r--r--common/xyzModem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/xyzModem.c b/common/xyzModem.c
index 5656aac48f..e0d87dbfec 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -71,12 +71,12 @@ typedef int cyg_int32;
static int
CYGACC_COMM_IF_GETC_TIMEOUT (char chan, char *c)
{
-#define DELAY 20
- unsigned long counter = 0;
- while (!tstc () && (counter < xyzModem_CHAR_TIMEOUT * 1000 / DELAY))
+
+ ulong now = get_timer(0);
+ while (!tstc ())
{
- udelay (DELAY);
- counter++;
+ if (get_timer(now) > xyzModem_CHAR_TIMEOUT)
+ break;
}
if (tstc ())
{