Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/sleepmode.asm @ 813:c87b9f2fb2f6
wakeup from deep sleep mode automatically upon USB connect
author | heinrichsweikamp |
---|---|
date | Tue, 14 Apr 2015 14:50:11 +0200 |
parents | c50296c3059e |
children | 2a0e5d884fc3 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/sleepmode.asm Wed Mar 25 18:24:58 2015 +0100 +++ b/code_part1/OSTC_code_asm_part1/sleepmode.asm Tue Apr 14 14:50:11 2015 +0200 @@ -64,7 +64,7 @@ onemin_sleep: call get_battery_voltage ; get battery voltage btfsc enter_error_sleep ; Enter Fatal Error Routine? - call fatal_error_sleep ; Yes (In Sleepmode_vxx.asm!) + goto fatal_error_sleep ; Yes (In Sleepmode_vxx.asm!) ;---- adjust airpressure compensation any 15 minutes incf divemins+1,F ; counts to 14... @@ -214,6 +214,10 @@ call get_battery_voltage ; get battery voltage btfss enter_error_sleep ; REALLY enter Fatal Error Routine? goto restart ; No + + btfss CHRG_IN ; If CHRG_IN=0 -> CC active + goto restart ; wake up + bsf LED_red clrwdt WAIT10US d'5'