X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=examples%2Flm3s1968%2Flm3s1968.c;h=edf7211071c1951f4e4d385c7ae91d5f357b4193;hb=378957f3d75a6bfe1f449e43659c9e2871757491;hp=9dfaf006a868f1cdb86b2fc2c0ae950c4ffc6466;hpb=5b8c7d324c8934f7686aeb4c23454cebbfd1f83f;p=bertos.git diff --git a/examples/lm3s1968/lm3s1968.c b/examples/lm3s1968/lm3s1968.c index 9dfaf006..edf72110 100644 --- a/examples/lm3s1968/lm3s1968.c +++ b/examples/lm3s1968/lm3s1968.c @@ -63,20 +63,34 @@ static void led_off(void) GPIO_PORTG_DATA_R &= ~0x04; } +static NORETURN void spinner_thread(void) +{ + char spinner[] = {'/', '-', '\\', '|'}; + int i; + + kputs("\n"); + for(i = 0; ; i++) + { + kprintf("BeRTOS is up & running: %c\r", + spinner[i % countof(spinner)]); + timer_delay(100); + } +} + int main(void) { IRQ_ENABLE; - kdbg_init(); - timer_init(); led_init(); + proc_testSetup(); + proc_testRun(); + + proc_new(spinner_thread, NULL, KERN_MINSTACKSIZE, NULL); while(1) { - kputs("STATUS LED: on \r"); led_on(); - timer_delay(1000); - kputs("STATUS LED: off\r"); + timer_delay(250); led_off(); - timer_delay(1000); + timer_delay(250); } }