diff src/start.asm @ 475:237afdfb4918

2.12 release candidate... buttons invertable via PC command (OSTC+ only)
author heinrichsweikamp
date Fri, 13 Jan 2017 13:08:17 +0100
parents 2880aa1264f5
children ad8acade5567
line wrap: on
line diff
--- a/src/start.asm	Wed Jan 04 15:04:42 2017 +0100
+++ b/src/start.asm	Fri Jan 13 13:08:17 2017 +0100
@@ -66,7 +66,16 @@
 	movlw	0x07
 	cpfseq	TABLAT
 	bcf	analog_switches
-	
+
+	; read button polarity
+	movlw	LOW	.897
+	movwf	EEADR
+	movlw	HIGH	.897
+	movwf	EEADRH
+	call    read_eeprom                ; EEDATA into EEPROM@EEADR
+	clrf	EEADRH			    ; Reset EEADRH
+	movff	EEDATA,button_polarity	    ; 0xFF (Both normal), 0x00 (Both inverted), 0x01 (Left inverted only), 0x02 (Right inverted only) 
+
 ; Air pressure compensation	after reset
 	call	get_calibration_data	; Get calibration data from pressure sensor
 	banksel common                  ; get_calibration_data uses isr_backup