comparison code_part1/OSTC_code_asm_part1/menu_reset.asm @ 459:770456638c66

fix reset gas with non-initialised eeprom
author heinrichsweikamp
date Thu, 01 Sep 2011 14:39:44 +0200
parents a76c5a3e9e96
children 6ad9af3a5771
comparison
equal deleted inserted replaced
458:d300e6ad6f66 459:770456638c66
435 goto restart ; all reset, quit to surfmode 435 goto restart ; all reset, quit to surfmode
436 436
437 ; Write WREG:lo twice, w/o any type clearing, pre-incrementing EEADR 437 ; Write WREG:lo twice, w/o any type clearing, pre-incrementing EEADR
438 reset_gas: 438 reset_gas:
439 movwf lo 439 movwf lo
440 rcall reset_eeprom_value ; First pair 440 incf EEADR,F
441 goto reset_eeprom_value ; Second pair. 441 movff lo, EEDATA ; Lowbyte Default value
442 call write_eeprom
443 incf EEADR,F
444 movff hi, EEDATA ; Highbyte default value
445 call write_eeprom
446 return
442 447
443 reset_customfunction: 448 reset_customfunction:
444 tblrd*+ 449 tblrd*+
445 movff TABLAT, lo ; Low byte in lo, 450 movff TABLAT, lo ; Low byte in lo,
446 tblrd*+ 451 tblrd*+