From 7c1cbd4ee23e3e4a311feab907a4a89f8e905aed Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Tue, 20 Nov 2007 21:54:06 +0000 Subject: [PATCH] Added speed detection user feedback and adjusted soft clock to ethernet polling. --- platform/apple2enh/clock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/apple2enh/clock.c b/platform/apple2enh/clock.c index d1e1626e2..6d4680591 100644 --- a/platform/apple2enh/clock.c +++ b/platform/apple2enh/clock.c @@ -30,9 +30,10 @@ * * Author: Oliver Schmidt * - * $Id: clock.c,v 1.1 2007/08/10 13:30:02 oliverschmidt Exp $ + * $Id: clock.c,v 1.2 2007/11/20 21:54:06 oliverschmidt Exp $ */ +#include #include #include "contiki.h" @@ -44,8 +45,6 @@ static unsigned char tick = 14; static clock_time_t time; -#include - /*-----------------------------------------------------------------------------------*/ void clock_init(void) @@ -54,6 +53,7 @@ clock_init(void) if(*(signed char *)0xC036 < 0) { /* 5 / 14 = 1.0MHz / 2.8MHz */ tick = 5; + fprintf(stderr, "Assuming 2.8 MHz ...\n"); } } } @@ -64,7 +64,7 @@ clock_update(void) static unsigned int count; count += tick; - if(count > 2500) { + if(count > 2000) { count = 0; ++time; }