summaryrefslogtreecommitdiff
path: root/firmware/test/kernel/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/test/kernel/main.c')
-rw-r--r--firmware/test/kernel/main.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/firmware/test/kernel/main.c b/firmware/test/kernel/main.c
index 6ce99c8065..b52ecff21d 100644
--- a/firmware/test/kernel/main.c
+++ b/firmware/test/kernel/main.c
@@ -17,6 +17,7 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "thread.h" 19#include "thread.h"
20#include "kernel.h"
20#include "sh7034.h" 21#include "sh7034.h"
21#include "debug.h" 22#include "debug.h"
22 23
@@ -30,11 +31,11 @@ void t2(void);
30 31
31int main(void) 32int main(void)
32{ 33{
33 char buf[40]; 34 char buf[40];
34 char str[32]; 35 char str[32];
35 int i=0; 36 int i=0;
36 37
37 /* Clear it all! */ 38 /* Clear it all! */
38 SSR1 &= ~(SCI_RDRF | SCI_ORER | SCI_PER | SCI_FER); 39 SSR1 &= ~(SCI_RDRF | SCI_ORER | SCI_PER | SCI_FER);
39 40
40 /* This enables the serial Rx interrupt, to be able to exit into the 41 /* This enables the serial Rx interrupt, to be able to exit into the
@@ -46,31 +47,31 @@ int main(void)
46 debugf("OK. Let's go\n"); 47 debugf("OK. Let's go\n");
47 48
48 tick_start(40); 49 tick_start(40);
49 50
50 create_thread(t1, s1, 1024); 51 create_thread(t1, s1, 1024);
51 create_thread(t2, s2, 1024); 52 create_thread(t2, s2, 1024);
52 53
53 while(1) 54 while(1)
54 { 55 {
55 debugf("t0\n"); 56 debugf("t0\n");
56 switch_thread(); 57 sleep(100);
57 } 58 }
58} 59}
59 60
60void t1(void) 61void t1(void)
61{ 62{
62 while(1) 63 while(1)
63 { 64 {
64 debugf("t1\n"); 65 debugf("t1\n");
65 switch_thread(); 66 sleep(200);
66 } 67 }
67} 68}
68 69
69void t2(void) 70void t2(void)
70{ 71{
71 while(1) 72 while(1)
72 { 73 {
73 debugf("t2\n"); 74 debugf("t2\n");
74 switch_thread(); 75 sleep(300);
75 } 76 }
76} 77}