diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-04-25 00:15:04 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-04-25 00:15:04 +0000 |
commit | 7b9581a13148957842ab53e2b28bf0a663a48980 (patch) | |
tree | 04db80bcc15ccb36c50d6e368c5846ec65bcd4f0 /firmware/test/kernel/main.c | |
parent | 99406a6635f91f5fc716cd0ca28e8364f7a97061 (diff) | |
download | rockbox-7b9581a13148957842ab53e2b28bf0a663a48980.tar.gz rockbox-7b9581a13148957842ab53e2b28bf0a663a48980.zip |
Not yet working
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@220 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/test/kernel/main.c')
-rw-r--r-- | firmware/test/kernel/main.c | 35 |
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 | ||
31 | int main(void) | 32 | int 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 | ||
60 | void t1(void) | 61 | void 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 | ||
69 | void t2(void) | 70 | void 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 | } |