Subversion Repositories freemyipod

Rev

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

Rev 265 Rev 300
Line 737... Line 737...
737
 
737
 
738
static void nand_thread(void)
738
static void nand_thread(void)
739
{
739
{
740
    while (1)
740
    while (1)
741
    {
741
    {
-
 
742
        mutex_lock(&nand_mtx, TIMEOUT_BLOCK);
742
        if (TIME_AFTER(USEC_TIMER, nand_last_activity_value + 200000) && nand_powered)
743
        if (TIME_AFTER(USEC_TIMER, nand_last_activity_value + 200000) && nand_powered)
743
            nand_power_down();
744
            nand_power_down();
-
 
745
        mutex_unlock(&nand_mtx);
744
        sleep(100000);
746
        sleep(100000);
745
    }
747
    }
746
}
748
}
747
 
749
 
748
int nand_device_init(void)
750
int nand_device_init(void)