projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lm3s1968: enable the kernel in the example.
[bertos.git]
/
examples
/
lm3s1968
/
lm3s1968.c
diff --git
a/examples/lm3s1968/lm3s1968.c
b/examples/lm3s1968/lm3s1968.c
index 9dfaf006a868f1cdb86b2fc2c0ae950c4ffc6466..edf7211071c1951f4e4d385c7ae91d5f357b4193 100644
(file)
--- a/
examples/lm3s1968/lm3s1968.c
+++ b/
examples/lm3s1968/lm3s1968.c
@@
-63,20
+63,34
@@
static void led_off(void)
GPIO_PORTG_DATA_R &= ~0x04;
}
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;
int main(void)
{
IRQ_ENABLE;
- kdbg_init();
- timer_init();
led_init();
led_init();
+ proc_testSetup();
+ proc_testRun();
+
+ proc_new(spinner_thread, NULL, KERN_MINSTACKSIZE, NULL);
while(1)
{
while(1)
{
- kputs("STATUS LED: on \r");
led_on();
led_on();
- timer_delay(1000);
- kputs("STATUS LED: off\r");
+ timer_delay(250);
led_off();
led_off();
- timer_delay(
100
0);
+ timer_delay(
25
0);
}
}
}
}