Mercurial > public > hwos_code
comparison src/isr.asm @ 451:66049b6f2c0b
speedup analog presses
author | heinrichsweikamp |
---|---|
date | Thu, 01 Sep 2016 13:24:17 +0200 |
parents | aadfe9f2edaf |
children | b4f28ab23b87 |
comparison
equal
deleted
inserted
replaced
450:791a25c4aab4 | 451:66049b6f2c0b |
---|---|
764 bcf INTCON3,INT1IF ; Clear flag | 764 bcf INTCON3,INT1IF ; Clear flag |
765 bcf INTCON,INT0IF ; Clear flag | 765 bcf INTCON,INT0IF ; Clear flag |
766 return | 766 return |
767 | 767 |
768 timer1int: | 768 timer1int: |
769 bcf PIR1,TMR1IF ; Clear flag | 769 bcf PIR1,TMR1IF ; Clear flag |
770 banksel common ; flag1 is in Bank1 | 770 banksel common ; flag1 is in Bank1 |
771 bcf INTCON,INT0IF ; Clear flag | 771 bcf INTCON,INT0IF ; Clear flag |
772 bcf INTCON3,INT1IF ; Clear flag | 772 bcf INTCON3,INT1IF ; Clear flag |
773 ; digital | |
773 btfss switch_left1 ; Left button hold-down? | 774 btfss switch_left1 ; Left button hold-down? |
774 bra timer1int_left ; Yes | 775 bra timer1int_left ; Yes |
775 btfss switch_right2 ; Right button hold-down? | 776 btfss switch_right2 ; Right button hold-down? |
776 bra timer1int_right ; Yes | 777 bra timer1int_right ; Yes |
777 | 778 |
779 ; Analog | |
780 btfsc analog_sw2_pressed ; Left button hold-down? | |
781 bra timer1int_left ; Yes | |
782 btfsc analog_sw1_pressed ; Right button hold-down? | |
783 bra timer1int_right ; Yes | |
784 | |
778 ; No button hold-down, stop Timer 1 | 785 ; No button hold-down, stop Timer 1 |
779 bcf T1CON,TMR1ON ; Stop Timer 1 | 786 bcf T1CON,TMR1ON ; Stop Timer 1 |
780 bsf INTCON,INT0IE ; Enable INT0 | 787 bsf INTCON,INT0IE ; Enable INT0 |
781 bsf INTCON3,INT1IE ; Enable INT1 | 788 bsf INTCON3,INT1IE ; Enable INT1 |
782 return | 789 return |
783 | 790 |
784 timer1int_left: | 791 timer1int_left: |
785 btfss flip_screen ; 180° flipped? | 792 btfss flip_screen ; 180° flipped? |
786 bsf switch_left ; (Re-)Set flag | 793 bsf switch_left ; (Re-)Set flag |
787 btfsc flip_screen ; 180° flipped? | 794 btfsc flip_screen ; 180° flipped? |