comparison src/cs/layer1/cfile/l1_pwmgr.c @ 328:daddb933047d

L1 sleep logic change: allow big sleep when light is on or we are charging
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 14 Dec 2017 02:45:22 +0000
parents 50a15a54801e
children dc1e0a1c100f
comparison
equal deleted inserted replaced
327:d7b25dca1266 328:daddb933047d
841 // check if immediate activity planned 841 // check if immediate activity planned
842 // 0 means immediate activity 842 // 0 means immediate activity
843 // in case big sleep is choosen (sleep mode == FRAME_STOP) because of UART or SIM, 843 // in case big sleep is choosen (sleep mode == FRAME_STOP) because of UART or SIM,
844 // return and wait end of this activity (few TDMA frames) then check on next TDMA frames 844 // return and wait end of this activity (few TDMA frames) then check on next TDMA frames
845 // if MS can go in deep sleep 845 // if MS can go in deep sleep
846 /*
847 * FreeCalypso change: the abstention from big sleep because of UART or SIM
848 * has been moved into Cust_check_system(), which now returns DO_NOT_SLEEP
849 * in these cases, while still returning FRAME_STOP if the cause is
850 * the backlight or charging.
851 */
846 if ( !min_time 852 if ( !min_time
847 || !HWtimer 853 || !HWtimer
848 || !min_time_gauging 854 || !min_time_gauging
855 #if 0 /* FreeCalypso change */
849 || (sleep_mode != CLOCK_STOP) 856 || (sleep_mode != CLOCK_STOP)
857 #endif
850 #if (OP_BT == 1) 858 #if (OP_BT == 1)
851 || !hci_ll_status 859 || !hci_ll_status
852 #endif 860 #endif
853 ) 861 )
854 { 862 {