Subversion Repositories freemyipod

Rev

Rev 58 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 58 Rev 66
Line 32... Line 32...
32
#include "storage.h"
32
#include "storage.h"
33
#include "disk.h"
33
#include "disk.h"
34
#include "usb/usb.h"
34
#include "usb/usb.h"
35
 
35
 
36
static const char welcomestring[] INITCONST_ATTR = "emBIOS v" VERSION " r" VERSION_SVN "\n\n";
36
static const char welcomestring[] INITCONST_ATTR = "emBIOS v" VERSION " r" VERSION_SVN "\n\n";
-
 
37
static const char initthreadname[] INITCONST_ATTR = "Initialisation thread";
-
 
38
static uint32_t initstack[0x400] INITBSS_ATTR;
37
 
39
 
38
void init() INITCODE_ATTR;
40
void initthread() INITCODE_ATTR;
39
void init()
41
void initthread()
40
{
42
{
41
    scheduler_init();
-
 
42
    console_init();
-
 
43
    lcd_init();
-
 
44
    lcdconsole_init();
-
 
45
    interrupt_init();
-
 
46
    cputs(1, welcomestring);
43
    cputs(1, welcomestring);
47
    i2c_init();
44
    i2c_init();
48
    power_init();
45
    power_init();
49
    usb_init();
46
    usb_init();
-
 
47
    DEBUGF("Initializing storage drivers...");
50
    storage_init();
48
    storage_init();
-
 
49
    DEBUGF("Initializing storage subsystem...");
51
    disk_init_subsystem();
50
    disk_init_subsystem();
-
 
51
    DEBUGF("Reading partition tables...");
52
    disk_init();
52
    disk_init();
-
 
53
    DEBUGF("Mounting partitions...");
53
    disk_mount_all();
54
    disk_mount_all();
54
}
-
 
55
55
    DEBUGF("Finished initialisation sequence");
-
 
56
}
-
 
57
 
-
 
58
void init() INITCODE_ATTR;
-
 
59
void init()
-
 
60
{
-
 
61
    scheduler_init();
-
 
62
    console_init();
-
 
63
    lcd_init();
-
 
64
    lcdconsole_init();
-
 
65
    interrupt_init();
-
 
66
    thread_create(initthreadname, initthread, initstack,
-
 
67
                  sizeof(initstack), USER_THREAD, 127, true);
-
 
68
}
-
 
69