Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/isr.asm @ 266:ba109a7948df
OSTC 2N uses exchanged switches...
author | heinrichsweikamp |
---|---|
date | Tue, 12 Apr 2011 08:11:50 +0200 |
parents | dee88c962653 |
children | 4ec488f046f4 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/isr.asm Tue Apr 12 01:19:33 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/isr.asm Tue Apr 12 08:11:50 2011 +0200 @@ -87,7 +87,12 @@ btfsc T0CON,TMR0ON ; Timer0 running? bra timer0_restart ; Yes, restart + ; OSTC 2N has flipped screen and exchanged switches... + movff win_flags,WREG ; Get into Bank0 + btfss WREG,0 bsf switch_left ; Set flag, button press is OK + btfsc WREG,0 + bsf switch_right ; Set flag, button press is OK bsf T0CON,TMR0ON ; Start Timer 0 return @@ -99,6 +104,11 @@ btfsc T0CON,TMR0ON ; Timer0 running? bra timer0_restart ; Yes, restart + ; OSTC 2N has flipped screen and exchanged switches... + movff win_flags,WREG ; Get into Bank0 + btfsc WREG,0 + bsf switch_left ; Set flag, button press is OK + btfss WREG,0 bsf switch_right ; Set flag, button press is OK bsf T0CON,TMR0ON ; Start Timer 0