#ifdef _CHANGEABLE_ID_
; lesen der ID aus dem EEPROM beim Start
read_EEPROM_ID:
+ push r_bytep
+ push r_rwbyte//r_temp2 and Z is not in gnu C save area
ldi r_temp2,lo8(E2END)
ldi zh,hi8(E2END)
subi r_temp2,7
cpi r_bytep,8
brne read_EEPROM_ID_loop
read_EEPROM_ID_end:
+ pop r_rwbyte
+ pop r_bytep
ret
#endif
lds r_temp,flashmarker
cpi r_temp,2
brne hrc_jmp_flasher_inc
- ldi r_temp,0xE0
+ ldi r_temp,0xC0
push r_temp
ldi r_temp,0x0E
push r_temp
#ifndef _DIS_FLASH_
; check for bootloader jumper
;vor allen anderen Registerconfigs
-
+ push r_temp
ldi r_temp,(1<<PUD) ;enable pullup
out _SFR_IO_ADDR(MCUCR) ,r_temp
sbi _SFR_IO_ADDR(PORTA),PINA5 ;internal pullup on PINA5
sbic _SFR_IO_ADDR(PINA),PINA5
rjmp owinit_botest_end ;PINA5 nicht 0.... nicht verbunden
cbi _SFR_IO_ADDR(DDRA),PINA4
- ldi r_temp,0xE0
+ ldi r_temp,0xC0
push r_temp
ldi r_temp,0x0E
push r_temp
sts bcount,r_temp
sts alarmflag,r_temp
RESETZEROMARKER
+ pop r_temp
ret
+
+
+.global EXTERN_SLEEP
+EXTERN_SLEEP:
+ cli
+ push r_temp
+ ldi r_temp,0
+ sts mode,r_temp ;SLEEP
+ sts gcontrol,r_temp
+ sts sendflag,r_temp
+ sts bcount,r_temp
+ RESETZEROMARKER
+ pop r_temp
+ sei
+ ret
\ No newline at end of file