Subversion Repositories freemyipod

Rev

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

Rev 961 Rev 968
Line 35... Line 35...
35
void targetinit_late()
35
void targetinit_late()
36
{
36
{
37
    int i;
37
    int i;
38
    
38
    
39
    clickwheel_init();
39
    clickwheel_init();
-
 
40
    int buttons = clickwheel_get_state() & 0x1f;
-
 
41
    if (buttons == 0x11)
-
 
42
    {
-
 
43
        cputs(CONSOLE_BOOT, "MENU+SELECT is being pressed.\n"
-
 
44
                            "Continue pressing these buttons to enter DFU mode.\n");
-
 
45
        while (buttons == 0x11)
-
 
46
        {
-
 
47
            sleep(100000);
-
 
48
            buttons = clickwheel_get_state() & 0x1f;
-
 
49
        }
-
 
50
        cputs(CONSOLE_BOOT, "MENU+SELECT was released. Continuing normal boot.\n");
-
 
51
    }    
40
    
52
    
41
    uint8_t* nor = (uint8_t*)memalign(0x10, 0x1000);
53
    uint8_t* nor = (uint8_t*)memalign(0x10, 0x1000);
42
    uint32_t* norword = (uint32_t*)nor;
54
    uint32_t* norword = (uint32_t*)nor;
43
    if (!nor) return;
55
    if (!nor) return;
44
    bootflash_readraw(nor, 0, 0x1000);
56
    bootflash_readraw(nor, 0, 0x1000);