Many changes from 2018
[owSlave2.git] / common / OWRomFunctions.s
index fb1d85b..6abeffc 100644 (file)
@@ -169,11 +169,7 @@ hrc_jmp_flasher:
        lds r_temp,flashmarker\r
        cpi r_temp,2\r
        brne hrc_jmp_flasher_inc\r
-       ldi r_temp,0xC0\r
-       push r_temp\r
-       ldi r_temp,0x0E\r
-       push r_temp\r
-       ret ; Direkter Sprung zum Bootloader\r
+       JMP_FLASHER\r
 hrc_jmp_flasher_inc:\r
        inc r_temp\r
        sts flashmarker,r_temp\r
@@ -276,7 +272,7 @@ h_searchroms_next: ; Setup next bit
 \r
        configZ owid,r_bcount\r
        ld r_rwbyte,Z\r
-       sts srbyte,r_rwbyte\r
+       sts srbyte,r_rwbyte ;#################### Doppelung ist schon in h_searchrom_next_bit\r
        rjmp h_searchrom_next_bit\r
                \r
 h_searchroms_next_bit: ;next Bit lesen\r
@@ -316,7 +312,7 @@ h_readrom_all:
 h_fwconfiginfo:\r
        cpi  r_bytep,24\r
        breq h_fwconfiginfo_crc\r
-#ifdef _CRC8_\r
+#if defined(_CRC8_)  || defined( _CRC8_16_) \r
        cpi  r_bytep,25\r
        breq h_fwconfiginfo_all\r
 #elif defined _CRC16_\r
@@ -446,31 +442,9 @@ spause:
 \r
 .global OWINIT\r
 OWINIT:\r
-#ifndef _DIS_FLASH_\r
-; check for bootloader jumper\r
-       ;vor allen anderen Registerconfigs\r
        push r_temp\r
-       ldi r_temp,(1<<PUD) ;enable pullup \r
-       out _SFR_IO_ADDR(MCUCR) ,r_temp\r
-       sbi _SFR_IO_ADDR(PORTA),PINA5 ;internal pullup on PINA5\r
-       sbi _SFR_IO_ADDR(PORTA),PINA4 ;internal pullup on PINA4\r
-       rcall spause\r
-       sbis _SFR_IO_ADDR(PINA),PINA5\r
-       rjmp owinit_botest_end  ;PinA5 nicht auf 1\r
-       sbis _SFR_IO_ADDR(PINA),PINA4\r
-       rjmp owinit_botest_end ;PinA4 nicht auf 1\r
-       cbi _SFR_IO_ADDR(PORTA),PINA4 \r
-       sbi _SFR_IO_ADDR(DDRA),PINA4  ;PINA4 AUSGANG und 0\r
-       rcall spause\r
-       sbic _SFR_IO_ADDR(PINA),PINA5 \r
-       rjmp owinit_botest_end ;PINA5 nicht 0.... nicht verbunden\r
-       cbi _SFR_IO_ADDR(DDRA),PINA4\r
-       ldi r_temp,0xC0\r
-       push r_temp\r
-       ldi r_temp,0x0E\r
-       push r_temp\r
-       ret ; Direkter Sprung zum Bootloader*/\r
-owinit_botest_end:\r
+#ifndef _DIS_FLASH_\r
+       CHECK_BOOTLOADER_PIN \r
 #endif\r
        HW_INIT  //Microcontroller specific\r
        CHIP_INIT //1-Wire device specific\r