diff src/isr.asm @ 451:66049b6f2c0b

speedup analog presses
author heinrichsweikamp
date Thu, 01 Sep 2016 13:24:17 +0200
parents aadfe9f2edaf
children b4f28ab23b87
line wrap: on
line diff
--- a/src/isr.asm	Wed Aug 31 14:48:10 2016 +0200
+++ b/src/isr.asm	Thu Sep 01 13:24:17 2016 +0200
@@ -766,20 +766,27 @@
 		return
 
 timer1int:
-   		bcf		PIR1,TMR1IF             ; Clear flag
+   	bcf	PIR1,TMR1IF             ; Clear flag
         banksel common                  ; flag1 is in Bank1
-		bcf		INTCON,INT0IF			; Clear flag
-		bcf		INTCON3,INT1IF			; Clear flag
+	bcf	INTCON,INT0IF		; Clear flag
+	bcf	INTCON3,INT1IF		; Clear flag
+	; digital
         btfss   switch_left1            ; Left button hold-down?
         bra     timer1int_left          ; Yes
         btfss   switch_right2           ; Right button hold-down?
         bra     timer1int_right         ; Yes
-
+	
+	; Analog
+	btfsc	analog_sw2_pressed      ; Left button hold-down?
+	bra     timer1int_left          ; Yes
+	btfsc	analog_sw1_pressed      ; Right button hold-down?
+	bra     timer1int_right         ; Yes
+	
         ; No button hold-down, stop Timer 1
         bcf     T1CON,TMR1ON            ; Stop Timer 1
         bsf     INTCON,INT0IE           ; Enable INT0
         bsf     INTCON3,INT1IE          ; Enable INT1
-		return
+	return
 
 timer1int_left:
         btfss   flip_screen             ; 180° flipped?