comparison src/isr.asm @ 152:19ad15f04f60

BUGFIX: Clear Setpoint-Fallback warning when in bailout NEW: 180? display rotation option
author heinrichsweikamp
date Thu, 21 Aug 2014 10:19:03 +0200
parents 022b886eddaf
children df449e5b1c81
comparison
equal deleted inserted replaced
151:5cb177f0948a 152:19ad15f04f60
713 713
714 isr_switch_right: ; 714 isr_switch_right: ;
715 bcf INTCON,INT0IE ; Disable INT0 715 bcf INTCON,INT0IE ; Disable INT0
716 ; bcf power_sw2 ; Power-down switch circuity 716 ; bcf power_sw2 ; Power-down switch circuity
717 banksel common ; flag1 is in Bank1 717 banksel common ; flag1 is in Bank1
718 bsf switch_right ; Set flag, button press is OK 718 btfss flip_screen ; 180° flipped?
719 bsf switch_right ; Set flag
720 btfsc flip_screen ; 180° flipped?
721 bsf switch_left ; Set flag
719 bra isr_switch_common ; Continue... 722 bra isr_switch_common ; Continue...
720 723
721 isr_switch_left: ; 724 isr_switch_left: ;
722 bcf INTCON3,INT1IE ; Disable INT1 725 bcf INTCON3,INT1IE ; Disable INT1
723 ; bcf power_sw1 ; Power-down switch circuity 726 ; bcf power_sw1 ; Power-down switch circuity
724 banksel common ; flag1 is in Bank1 727 banksel common ; flag1 is in Bank1
725 bsf switch_left ; Set flag, button press is OK 728 btfss flip_screen ; 180° flipped?
729 bsf switch_left ; Set flag
730 btfsc flip_screen ; 180° flipped?
731 bsf switch_right ; Set flag
726 732
727 isr_switch_common: 733 isr_switch_common:
728 ; load timer1 for first press 734 ; load timer1 for first press
729 clrf TMR1L 735 clrf TMR1L
730 movlw TMR1H_VALUE_FIRST ; in steps of 7,8125ms 736 movlw TMR1H_VALUE_FIRST ; in steps of 7,8125ms
774 bcf T1CON,TMR1ON ; Stop Timer 1 780 bcf T1CON,TMR1ON ; Stop Timer 1
775 bsf INTCON,INT0IE ; Enable INT0 781 bsf INTCON,INT0IE ; Enable INT0
776 bsf INTCON3,INT1IE ; Enable INT1 782 bsf INTCON3,INT1IE ; Enable INT1
777 bcf INTCON,INT0IF ; Clear flag 783 bcf INTCON,INT0IF ; Clear flag
778 bcf INTCON3,INT1IF ; Clear flag 784 bcf INTCON3,INT1IF ; Clear flag
779 ; bcf switch_left
780 ; bcf switch_right
781 return 785 return
782 786
783 timer1int_left: 787 timer1int_left:
784 ; bcf power_sw1 ; Power-down switch circuity 788 btfss flip_screen ; 180° flipped?
785 bsf switch_left ; (Re-)Set flag 789 bsf switch_left ; (Re-)Set flag
790 btfsc flip_screen ; 180° flipped?
791 bsf switch_right ; (Re-)Set flag
786 bra timer1int_common ; Continue 792 bra timer1int_common ; Continue
787 timer1int_right: 793 timer1int_right:
788 ; bcf power_sw2 ; Power-down switch circuity 794 btfss flip_screen ; 180° flipped?
789 bsf switch_right ; (Re-)Set flag 795 bsf switch_right ; Set flag
796 btfsc flip_screen ; 180° flipped?
797 bsf switch_left ; Set flag
790 timer1int_common: 798 timer1int_common:
791 ; load timer1 for next press 799 ; load timer1 for next press
792 clrf TMR1L 800 clrf TMR1L
793 movlw TMR1H_VALUE_CONT ; Surface mode 801 movlw TMR1H_VALUE_CONT ; Surface mode
794 btfsc divemode 802 btfsc divemode