comparison chipsetsw/layer1/cfile/l1_pwmgr.c @ 132:c721b9d301b9

l1_pwmgr.c: l1s_compute_wakeup_ticks() reconstructed
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 14 May 2016 16:31:53 +0000
parents 244b007df481
children e6611ca0d054
comparison
equal deleted inserted replaced
131:244b007df481 132:c721b9d301b9
1511 /*-------------------------------------------------------*/ 1511 /*-------------------------------------------------------*/
1512 BOOL l1s_compute_wakeup_ticks(void) 1512 BOOL l1s_compute_wakeup_ticks(void)
1513 { 1513 {
1514 UWORD16 temp_clear_intr; 1514 UWORD16 temp_clear_intr;
1515 #if (CODE_VERSION != SIMULATION) 1515 #if (CODE_VERSION != SIMULATION)
1516 if (l1_config.pwr_mngt == PWR_MNGT)
1517 {
1518 // read current value of count down counter 1516 // read current value of count down counter
1519 l1s.pw_mgr.sleep_duration = READ_ULDP_TIMER_VALUE; 1517 l1s.pw_mgr.sleep_duration = READ_ULDP_TIMER_VALUE;
1520 1518
1521 // if count down=0 it's a scheduled wake-up.... 1519 // if count down=0 it's a scheduled wake-up....
1522 if (l1s.pw_mgr.sleep_duration == 0) 1520 if (l1s.pw_mgr.sleep_duration == 0)
1556 { 1554 {
1557 // read sleeping planned value in TPU INIT register & compute time elapsed 1555 // read sleeping planned value in TPU INIT register & compute time elapsed
1558 l1s.pw_mgr.sleep_duration = READ_ULDP_TIMER_INIT - l1s.pw_mgr.sleep_duration; 1556 l1s.pw_mgr.sleep_duration = READ_ULDP_TIMER_INIT - l1s.pw_mgr.sleep_duration;
1559 return(TRUE); 1557 return(TRUE);
1560 } 1558 }
1561 } 1559 #else
1562 #endif
1563 return(FALSE);//omaps00090550 1560 return(FALSE);//omaps00090550
1561 #endif
1564 } 1562 }
1565 1563
1566 /*-------------------------------------------------------*/ 1564 /*-------------------------------------------------------*/
1567 /* l1s_recover_Frame() */ 1565 /* l1s_recover_Frame() */
1568 /*-------------------------------------------------------*/ 1566 /*-------------------------------------------------------*/