comparison code_part1/OSTC_code_asm_part1/sleepmode.asm @ 21:73014f788032

1.60 stable rc1
author heinrichsweikamp
date Wed, 21 Apr 2010 17:37:30 +0200
parents 1cdf96a7946f
children 14a074e1a375
comparison
equal deleted inserted replaced
20:8824446f7241 21:73014f788032
115 call test_charger ; charger on? 115 call test_charger ; charger on?
116 116
117 btfss nofly_active 117 btfss nofly_active
118 bra onesec_sleep_nonofly 118 bra onesec_sleep_nonofly
119 119
120 call set_LEDnofly ; Set nofly LED 120 bsf LED_blue ; Set nofly LED
121 121
122 nop 122 nop
123 sleep 123 sleep
124 nop 124 nop
125 125
126 onesec_sleep_nonofly: 126 onesec_sleep_nonofly:
127 call clear_LEDnofly ; Clear nofly LED 127 bcf LED_blue ; Clear nofly LED
128 incf divemins+0,F ; counts to #test_pressure_in_sleep (5) 128 incf divemins+0,F ; counts to #test_pressure_in_sleep (5)
129 movlw d'5' 129 movlw d'5'
130 cpfsgt divemins+0 ; here: temp variable 130 cpfsgt divemins+0 ; here: temp variable
131 bra onesec_sleep1 ; #test_pressure_in_sleep not done yet 131 bra onesec_sleep1 ; #test_pressure_in_sleep not done yet
132 rcall pressuretest_sleep_fast ; Gets pressure without averaging (faster!) 132 rcall pressuretest_sleep_fast ; Gets pressure without averaging (faster!)
227 sleep 227 sleep
228 nop 228 nop
229 decfsz temp1,F 229 decfsz temp1,F
230 bra fatal_error_sleep_loop1 230 bra fatal_error_sleep_loop1
231 fatal_error_sleep_loop2: 231 fatal_error_sleep_loop2:
232 call set_LEDy 232 bsf LED_red
233 clrwdt 233 clrwdt
234 WAIT10US d'5' 234 WAIT10US d'5'
235 call clear_LEDy 235 bcf LED_red
236 sleep 236 sleep
237 nop 237 nop
238 decfsz temp4,F 238 decfsz temp4,F
239 bra fatal_error_sleep_loop2 239 bra fatal_error_sleep_loop2
240 bra fatal_error_sleep_loop 240 bra fatal_error_sleep_loop