1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
BOOTLOADER sequence of handling USB bridge (works)
    ide_power_enable(true);
    sleep(HZ/20);
    ata_enable(false);
    usb_enable(true);

/firmware/usb.c static inline void usb_slave_mode(_Bool on) sequence (doesn't work)
    do { } while(0);
    disk_unmount_all();           <- internal rockbox housekeeping
    ata_soft_reset();             <- write reset command to the drive
    ata_init();                   <- ata_is_coldstart();
                                 ata_device_init();
                                 ata_enable(true)

    ata_enable(0);                <- ata_enable(false)
    usb_enable(1);                <- usb_enable(true)
    cpu_idle_mode(1);             <- cpu_idle_mode(true)