X-Git-Url: http://git.smho.de/?a=blobdiff_plain;f=common%2FOWRomFunctions.s;h=fb1d85bd1ce07f4bf369aa62817653140b4221d1;hb=5398c69061a72e7a6ad3423c4e17516ee6d09de6;hp=e5c007b134b715e8bbe0829343a7b72f7f22876f;hpb=a6a04f58e4afd20f206fdf4a8a7b3ce4062f1b67;p=owSlave2.git diff --git a/common/OWRomFunctions.s b/common/OWRomFunctions.s index e5c007b..fb1d85b 100644 --- a/common/OWRomFunctions.s +++ b/common/OWRomFunctions.s @@ -1,4 +1,4 @@ -// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de +// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -185,6 +185,8 @@ hrc_set_searchrom: lds r_rwbyte,owid ;erstes Byte lesen rjmp h_searchrom_next_bit + + hrc_start_read_command: ;Skip rom und Matchrom ok... ldi r_mode,OW_READ_COMMAND CRCInit1 @@ -312,30 +314,36 @@ h_readrom_all: ;--------------------------------------------------- h_fwconfiginfo: - cpi r_bytep,16 + cpi r_bytep,24 breq h_fwconfiginfo_crc #ifdef _CRC8_ - cpi r_bytep,17 + cpi r_bytep,25 breq h_fwconfiginfo_all #elif defined _CRC16_ - cpi r_bytep,17 - breq h_fwconfiginfo_crc2 - cpi r_bytep,18 + cpi r_bytep,26 breq h_fwconfiginfo_all #else - cpi r_bytep,16 + cpi r_bytep,25 breq h_fwconfiginfo_all #warning No CRC known code implemented #endif +h_fwconfiginfo_end: configZ config_info,r_bytep ld r_rwbyte,Z rjmp handle_end_inc h_fwconfiginfo_crc: +#ifdef _CRC8_ lds r_rwbyte,crc rjmp handle_end_inc -h_fwconfiginfo_crc2: - lds r_rwbyte,crc+1 - rjmp handle_end_inc +#elif defined _CRC16_ + lds r_temp,crc + com r_temp + sts config_info+24,r_temp + lds r_temp,crc+1 + com r_temp + sts config_info+25,r_temp + rjmp h_fwconfiginfo_end +#endif h_fwconfiginfo_all: rjmp handle_end_sleep