From: Mart Lubbers Date: Mon, 12 Oct 2015 14:41:45 +0000 (+0200) Subject: small update and hand in X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=53b6c0abf309ce0398e577d735116654887fa08b;p=des2015.git small update and hand in --- diff --git a/mart/ex11/ex11.c b/mart/ex11/ex11.c index fade86c..3b95b92 100644 --- a/mart/ex11/ex11.c +++ b/mart/ex11/ex11.c @@ -44,7 +44,6 @@ void taskd(void *arg) RTIME step = time/(2*MAXX+2); unsigned int i; - //To the right outb(0x00, 0x378); rt_task_sleep(step*2); for(i=0; i msglen ? 0 : pointer+1; + pointer = pointer > msglen ? 0 : pointer+1; } void taski(void *arg) @@ -63,7 +62,6 @@ void taski(void *arg) //Register as interrupt handler RT_INTR intr; rt_intr_create(&intr, NULL, LPT1IRQ, 0); - //rt_printf("Interrupt created\n"); //Initialize and declare the timer variables RTIME tick = rt_timer_read(); @@ -80,7 +78,6 @@ void taski(void *arg) rt_task_create(&drawtask, NULL, 0, 50, 0); period = ticks[TICKS]+tocks[TICKS]; rt_task_start(&drawtask, &taskd, &period); - //rt_printf("tocks is the short stretch\n"); } rt_intr_wait(&intr, TM_INFINITE); @@ -94,148 +91,149 @@ void taski(void *arg) rt_task_create(&drawtask, NULL, 0, 50, 0); period = ticks[TICKS]+tocks[TICKS]; rt_task_start(&drawtask, &taskd, &period); - //rt_printf("ticks is the short stretch\n"); } rt_intr_wait(&intr, TM_INFINITE); - //Print average - //rt_printf("avgtick: %lluns, avgtock: %lluns, avgticktock: %lluns\n", - // ticks[TICKS], tocks[TICKS], (ticks[TICKS]+tocks[TICKS])/2); } } void make_message(char *msg) { - unsigned int i=20; - unsigned char s = 0; - while(i