Rename Files of different Devices
[owSlave2.git] / common / OWPinInterrupt.s
index 660c7f3..00feec0 100644 (file)
@@ -43,6 +43,7 @@ PIN_INTERRIPT:
        ;Weitere Register sichern
     push r_temp2 
        push r_temp
+       sdb
        ; Wegen Power Down Mode Widerherstellen der fallenden Flanke und disable von POWER DONW 
        SET_FALLING_RESET_SLEEP
        push r_bcount
@@ -117,16 +118,18 @@ zeropolling:
        sbic OW_PIN,OW_PINN ;warten bis leitung wieder h 
        rjmp zeropolling_wait  ;leitung ist low ->Schleie
        in r_temp,TCNT_REG
-       cpi r_temp,(~OWT_MIN_RESET)+50;aller zwei us zaehlt der timer
+       cpi r_temp,(~OWT_MIN_RESET)+OWT_ZP_WAIT_LOW_TO;aller zwei us zaehlt der timer
        brsh  zeropolling_timeout ;Timeout Reset?
        rjmp zeropolling
 zeropolling_wait:
        sbis OW_PIN,OW_PINN ;warten bis leitung wieder l
        rjmp zeropolling_low_imp ;Leitung ist low raus aus schleufe
        in r_temp,TCNT_REG
-       cpi r_temp,(~OWT_MIN_RESET)+70 ;aller zwei us zaehlt der timer
-       brsh  zeropolling_timeout ;Timeout
-       rjmp zeropolling_wait
+       cpi r_temp,(~OWT_MIN_RESET)+OWT_ZP_WAIT_HIGH_TO ;aller zwei us zaehlt der timer
+       sbis OW_PIN,OW_PINN ;noch eine Abfrage, da sonst schleife zu lang (sbis aendert keine flags)
+       rjmp zeropolling_low_imp ;Leitung ist low raus aus schleufe
+       brlo zeropolling_wait
+       rjmp zeropolling_timeout 
 zeropolling_low_imp:
        sbi OW_DDR,OW_PINN 
        RESETZEROMARKER 
@@ -147,6 +150,7 @@ no_zerromaker:
        pop r_rwbyte
        pop r_bcount
        pop r_temp
+       cdb
        cbi OW_DDR,OW_PINN  ;vorsichtsmassname Nicht dauerhaft auf low
        pop r_temp2                       //; die benutzten Register wiederherstellen
     out _SFR_IO_ADDR(SREG),r_temp2