summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/SOURCES5
-rw-r--r--apps/main.c49
-rw-r--r--firmware/SOURCES44
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
2main.c
3#else
4alarm_menu.c 1alarm_menu.c
5bookmark.c 2bookmark.c
6credits.c 3credits.c
@@ -45,4 +42,4 @@ recorder/radio.c
45#ifdef HAVE_RECORDING 42#ifdef HAVE_RECORDING
46recorder/recording.c 43recorder/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
25unsigned long test_thread_stack[0x1000];
26
27void yield(void)
28{
29 switch_thread();
30 wake_up_thread();
31}
32
33void test_thread(void)
34{
35 while(1)
36 {
37 GPIO1_OUT ^= 0x00020000;
38 yield();
39 }
40}
41
42int 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)
157void init(void) 117void 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
2crt0.S
3backlight.c
4thread.c
5system.c
6kernel.c
7common/memcpy_a.S
8common/memset_a.S
9common/atoi.c
10common/ctype.c
11common/dir.c
12common/disk.c
13common/errno.c
14common/file.c
15common/random.c
16common/sprintf.c
17common/strcasecmp.c
18common/strcat.c
19common/strchr.c
20common/strcmp.c
21common/strcpy.c
22common/strlen.c
23common/strncmp.c
24common/strncpy.c
25common/strrchr.c
26common/strtok.c
27panic.c
28font.c
29drivers/lcd.S
30drivers/lcd-h100.c
31drivers/ata.c
32drivers/led.c
33drivers/adc.c
34drivers/button.c
35drivers/fat.c
36drivers/power.c
37#else
38backlight.c 1backlight.c
39buffer.c 2buffer.c
40common/atoi.c 3common/atoi.c
@@ -96,8 +59,12 @@ drivers/lcd-player-charset.c
96drivers/lcd-player.c 59drivers/lcd-player.c
97#endif 60#endif
98#ifdef HAVE_LCD_BITMAP 61#ifdef HAVE_LCD_BITMAP
62#if CONFIG_LCD == LCD_S1D15E06
63drivers/lcd-h100.c
64#else
99drivers/lcd-recorder.c 65drivers/lcd-recorder.c
100#endif 66#endif
67#endif
101drivers/led.c 68drivers/led.c
102#if CONFIG_HWCODEC != MASNONE 69#if CONFIG_HWCODEC != MASNONE
103drivers/mas.c 70drivers/mas.c
@@ -126,6 +93,5 @@ crt0.S
126#if CONFIG_CPU == SH7034 93#if CONFIG_CPU == SH7034
127bitswap.S 94bitswap.S
128descramble.S 95descramble.S
129drivers/lcd.S
130#endif
131#endif 96#endif
97drivers/lcd.S