Mercurial > public > mk2
changeset 813:c87b9f2fb2f6
wakeup from deep sleep mode automatically upon USB connect
author | heinrichsweikamp |
---|---|
date | Tue, 14 Apr 2015 14:50:11 +0200 |
parents | 86efd57c158c |
children | e50e76f99636 |
files | code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/sleepmode.asm code_part1/OSTC_code_asm_part1/surfmode.asm |
diffstat | 3 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm Wed Mar 25 18:24:58 2015 +0100 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Tue Apr 14 14:50:11 2015 +0200 @@ -168,7 +168,7 @@ call timeout_divemenu ; Yes, so check for timeout divemenu call set_leds_divemode ; Sets warnings, if required. Also Sets buzzer btfsc enter_error_sleep ; Enter Fatal Error Routine? - call fatal_error_sleep ; Yes (In Sleepmode.asm!) + goto fatal_error_sleep ; Yes (In Sleepmode.asm!) diveloop_loop3: btfss menubit ; Divemode menu active?
--- 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'
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm Wed Mar 25 18:24:58 2015 +0100 +++ b/code_part1/OSTC_code_asm_part1/surfmode.asm Tue Apr 14 14:50:11 2015 +0200 @@ -143,7 +143,7 @@ call DISP_display_gf_surface ; Display GF (if > CF8). btfsc enter_error_sleep ; Enter Fatal Error Routine? - call fatal_error_sleep ; Yes (In Sleepmode.asm!) + goto fatal_error_sleep ; Yes (In Sleepmode.asm!) bcf onesecupdate ; every second tasks done surfloop_loop2: