changeset 459:770456638c66

fix reset gas with non-initialised eeprom
author heinrichsweikamp
date Thu, 01 Sep 2011 14:39:44 +0200
parents d300e6ad6f66
children 274689f46b1a
files code_part1/OSTC_code_asm_part1/menu_reset.asm
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm	Thu Sep 01 12:22:46 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm	Thu Sep 01 14:39:44 2011 +0200
@@ -437,8 +437,13 @@
 ; Write WREG:lo twice, w/o any type clearing, pre-incrementing EEADR
 reset_gas:
     movwf   lo
-    rcall   reset_eeprom_value      ; First pair
-    goto    reset_eeprom_value      ; Second pair.
+	incf	EEADR,F
+	movff	lo, EEDATA				; Lowbyte Default value
+	call	write_eeprom
+	incf	EEADR,F
+	movff	hi, EEDATA				; Highbyte default value
+	call    write_eeprom
+	return
 
 reset_customfunction:
     tblrd*+