introduce macros bigjmp and bigcall for intermodule calls/jmps
translates to rjmp/rcall on MCUs with up to 8K flash and to jmp/call on others.
This commit is contained in:
30
avr/common/calls.asm
Normal file
30
avr/common/calls.asm
Normal file
@@ -0,0 +1,30 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2025 by Martin Preuss
|
||||
; email : martin@libchipcard.de
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * This file is part of the project "AqHome". *
|
||||
; * Please see toplevel file COPYING of that project for license details. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
|
||||
.macro bigcall
|
||||
.if FLASHEND >= 0x1000
|
||||
call @0
|
||||
.else
|
||||
rcall @0
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
|
||||
.macro bigjmp
|
||||
.if FLASHEND >= 0x1000
|
||||
jmp @0
|
||||
.else
|
||||
rjmp @0
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ waitFor10ms:
|
||||
ldi r22, 100
|
||||
waitFor10ms_loop:
|
||||
push r22
|
||||
rcall Utils_WaitFor100MicroSecs
|
||||
bigcall Utils_WaitFor100MicroSecs
|
||||
pop r22
|
||||
dec r22
|
||||
brne waitFor10ms_loop
|
||||
|
||||
Reference in New Issue
Block a user