comparison code_part1/OSTC_code_asm_part1/menu_reset.asm @ 341:2144f19fa1eb

BUGFIX protect against ISR changing pressure/temperature while reading it.
author JeanDo
date Fri, 20 May 2011 00:48:30 +0200
parents a86c9d1219ce
children 7250ca7c8d24 f49d6f0fc870
comparison
equal deleted inserted replaced
340:ecbbbd423e86 341:2144f19fa1eb
282 282
283 do_menu_reset_decodata2: 283 do_menu_reset_decodata2:
284 ; reset deco data 284 ; reset deco data
285 call PLED_ClearScreen 285 call PLED_ClearScreen
286 DISPLAYTEXT .25 ; "Reset..." 286 DISPLAYTEXT .25 ; "Reset..."
287 movff amb_pressure+0,int_I_pres_respiration+0 ; copy surface air pressure to deco routine 287 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine
288 movff amb_pressure+1,int_I_pres_respiration+1
289 call deco_clear_tissue 288 call deco_clear_tissue
290 movlb b'00000001' ; RAM Bank1 selected 289 movlb b'00000001' ; RAM Bank1 selected
291 goto restart ; done. quit to surfmode 290 goto restart ; done. quit to surfmode
292 291
293 do_menu_reset_all: 292 do_menu_reset_all:
301 call PLED_ClearScreen 300 call PLED_ClearScreen
302 DISPLAYTEXT .25 ; "Reset..." 301 DISPLAYTEXT .25 ; "Reset..."
303 302
304 reset_start: 303 reset_start:
305 ; reset deco data 304 ; reset deco data
306 movff amb_pressure+0,int_I_pres_respiration+0 ; copy surface air pressure to deco routine 305 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine
307 movff amb_pressure+1,int_I_pres_respiration+1
308 call deco_clear_tissue 306 call deco_clear_tissue
309 movlb b'00000001' ; RAM Bank1 selected 307 movlb b'00000001' ; RAM Bank1 selected
310 308
311 ; reset gases 309 ; reset gases
312 clrf EEADRH ; EEPROM BANK 0 ! 310 clrf EEADRH ; EEPROM BANK 0 !