diff options
-rw-r--r-- | apps/SOURCES | 5 | ||||
-rw-r--r-- | apps/main.c | 49 | ||||
-rw-r--r-- | firmware/SOURCES | 44 |
3 files changed, 10 insertions, 88 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index edb3bb3dd2..43cd3ddfb2 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifdef IRIVER_H100 | ||
2 | main.c | ||
3 | #else | ||
4 | alarm_menu.c | 1 | alarm_menu.c |
5 | bookmark.c | 2 | bookmark.c |
6 | credits.c | 3 | credits.c |
@@ -45,4 +42,4 @@ recorder/radio.c | |||
45 | #ifdef HAVE_RECORDING | 42 | #ifdef HAVE_RECORDING |
46 | recorder/recording.c | 43 | recorder/recording.c |
47 | #endif | 44 | #endif |
48 | #endif | 45 | |
diff --git a/apps/main.c b/apps/main.c index 8bcc25ae40..8154c44dcc 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -18,46 +18,6 @@ | |||
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | 19 | #include "config.h" |
20 | 20 | ||
21 | #if defined(IRIVER_H100) && !defined(SIMULATOR) | ||
22 | #include "thread.h" | ||
23 | #include "cpu.h" | ||
24 | |||
25 | unsigned long test_thread_stack[0x1000]; | ||
26 | |||
27 | void yield(void) | ||
28 | { | ||
29 | switch_thread(); | ||
30 | wake_up_thread(); | ||
31 | } | ||
32 | |||
33 | void test_thread(void) | ||
34 | { | ||
35 | while(1) | ||
36 | { | ||
37 | GPIO1_OUT ^= 0x00020000; | ||
38 | yield(); | ||
39 | } | ||
40 | } | ||
41 | |||
42 | int main(void) | ||
43 | { | ||
44 | int i; | ||
45 | |||
46 | init_threads(); | ||
47 | |||
48 | create_thread(test_thread, test_thread_stack, | ||
49 | sizeof(test_thread_stack), "Test thread"); | ||
50 | |||
51 | GPIO1_FUNCTION |= 0x00020000; | ||
52 | GPIO1_ENABLE |= 0x00020000; | ||
53 | |||
54 | while(1) { | ||
55 | for(i = 0;i < 10000;i++) {} | ||
56 | yield(); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | #else | ||
61 | #include "ata.h" | 21 | #include "ata.h" |
62 | #include "disk.h" | 22 | #include "disk.h" |
63 | #include "fat.h" | 23 | #include "fat.h" |
@@ -157,9 +117,10 @@ void init(void) | |||
157 | void init(void) | 117 | void init(void) |
158 | { | 118 | { |
159 | int rc; | 119 | int rc; |
120 | #if defined(HAVE_CHARGING) && (CONFIG_CPU == SH7034) | ||
160 | /* if nobody initialized ATA before, I consider this a cold start */ | 121 | /* if nobody initialized ATA before, I consider this a cold start */ |
161 | bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */ | 122 | bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */ |
162 | 123 | #endif | |
163 | system_init(); | 124 | system_init(); |
164 | kernel_init(); | 125 | kernel_init(); |
165 | 126 | ||
@@ -204,7 +165,7 @@ void init(void) | |||
204 | radio_init(); | 165 | radio_init(); |
205 | #endif | 166 | #endif |
206 | 167 | ||
207 | #ifdef HAVE_CHARGING | 168 | #if defined(HAVE_CHARGING) && (CONFIG_CPU == SH7034) |
208 | if (coldstart && charger_inserted() | 169 | if (coldstart && charger_inserted() |
209 | && !global_settings.car_adapter_mode | 170 | && !global_settings.car_adapter_mode |
210 | #ifdef ATA_POWER_PLAYERSTYLE | 171 | #ifdef ATA_POWER_PLAYERSTYLE |
@@ -218,8 +179,6 @@ void init(void) | |||
218 | /* "On" pressed or USB connected: proceed */ | 179 | /* "On" pressed or USB connected: proceed */ |
219 | show_logo(); /* again, to provide better visual feedback */ | 180 | show_logo(); /* again, to provide better visual feedback */ |
220 | } | 181 | } |
221 | #else | ||
222 | (void)coldstart; | ||
223 | #endif | 182 | #endif |
224 | 183 | ||
225 | rc = ata_init(); | 184 | rc = ata_init(); |
@@ -311,4 +270,4 @@ int main(void) | |||
311 | return 0; | 270 | return 0; |
312 | } | 271 | } |
313 | #endif | 272 | #endif |
314 | #endif | 273 | |
diff --git a/firmware/SOURCES b/firmware/SOURCES index fc8430b0c4..535b221127 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -1,40 +1,3 @@ | |||
1 | #ifdef IRIVER_H100 | ||
2 | crt0.S | ||
3 | backlight.c | ||
4 | thread.c | ||
5 | system.c | ||
6 | kernel.c | ||
7 | common/memcpy_a.S | ||
8 | common/memset_a.S | ||
9 | common/atoi.c | ||
10 | common/ctype.c | ||
11 | common/dir.c | ||
12 | common/disk.c | ||
13 | common/errno.c | ||
14 | common/file.c | ||
15 | common/random.c | ||
16 | common/sprintf.c | ||
17 | common/strcasecmp.c | ||
18 | common/strcat.c | ||
19 | common/strchr.c | ||
20 | common/strcmp.c | ||
21 | common/strcpy.c | ||
22 | common/strlen.c | ||
23 | common/strncmp.c | ||
24 | common/strncpy.c | ||
25 | common/strrchr.c | ||
26 | common/strtok.c | ||
27 | panic.c | ||
28 | font.c | ||
29 | drivers/lcd.S | ||
30 | drivers/lcd-h100.c | ||
31 | drivers/ata.c | ||
32 | drivers/led.c | ||
33 | drivers/adc.c | ||
34 | drivers/button.c | ||
35 | drivers/fat.c | ||
36 | drivers/power.c | ||
37 | #else | ||
38 | backlight.c | 1 | backlight.c |
39 | buffer.c | 2 | buffer.c |
40 | common/atoi.c | 3 | common/atoi.c |
@@ -96,8 +59,12 @@ drivers/lcd-player-charset.c | |||
96 | drivers/lcd-player.c | 59 | drivers/lcd-player.c |
97 | #endif | 60 | #endif |
98 | #ifdef HAVE_LCD_BITMAP | 61 | #ifdef HAVE_LCD_BITMAP |
62 | #if CONFIG_LCD == LCD_S1D15E06 | ||
63 | drivers/lcd-h100.c | ||
64 | #else | ||
99 | drivers/lcd-recorder.c | 65 | drivers/lcd-recorder.c |
100 | #endif | 66 | #endif |
67 | #endif | ||
101 | drivers/led.c | 68 | drivers/led.c |
102 | #if CONFIG_HWCODEC != MASNONE | 69 | #if CONFIG_HWCODEC != MASNONE |
103 | drivers/mas.c | 70 | drivers/mas.c |
@@ -126,6 +93,5 @@ crt0.S | |||
126 | #if CONFIG_CPU == SH7034 | 93 | #if CONFIG_CPU == SH7034 |
127 | bitswap.S | 94 | bitswap.S |
128 | descramble.S | 95 | descramble.S |
129 | drivers/lcd.S | ||
130 | #endif | ||
131 | #endif | 96 | #endif |
97 | drivers/lcd.S | ||