summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/apps/main.c b/apps/main.c
index 20a7923e42..0492b0b778 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -16,10 +16,50 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "ata.h"
20#include "disk.h"
21#include "fat.h"
22#include "lcd.h"
23#include "debug.h"
24#include "led.h"
25#include "kernel.h"
26#include "button.h"
19#include "tree.h" 27#include "tree.h"
20 28
29int init(void)
30{
31 debug_init();
32 kernel_init();
33 set_irq_level(0);
34
35 if(ata_init()) {
36 DEBUGF("*** Warning! The disk is uninitialized\n");
37 }
38 DEBUGF("ATA initialized\n");
39
40 if (disk_init()) {
41 DEBUGF("*** Failed reading partitions\n");
42 return -1;
43 }
44
45 if(fat_mount(part[0].start)) {
46 DEBUGF("*** Failed mounting fat\n");
47 }
48
49 button_init();
50
51 return 0;
52}
53
21int main(void) 54int main(void)
22{ 55{
56 init();
57
23 browse_root(); 58 browse_root();
59
60 while(1) {
61 led(true); sleep(HZ/10);
62 led(false); sleep(HZ/10);
63 }
24 return 0; 64 return 0;
25} 65}