add macro for shared isr call

This commit is contained in:
Fabian
2019-12-13 10:46:58 +01:00
parent d81c339d5f
commit 22023b7356
+14 -16
View File
@@ -9,26 +9,24 @@
#include "Codec/Codec.h"
#include <avr/interrupt.h>
; Use this macro to call isr functions
.macro call_isr isr_address
push r30
push r31
lds r30, \isr_address
lds r31, \isr_address+1
icall
pop r31
pop r30
reti
.endm
; Find first pause and start sampling
.global CODEC_DEMOD_IN_INT0_VECT
CODEC_DEMOD_IN_INT0_VECT:
push r30
push r31
lds r30, isr_func_CODEC_DEMOD_IN_INT0_VECT
lds r31, isr_func_CODEC_DEMOD_IN_INT0_VECT + 1
icall
pop r31
pop r30
reti
call_isr isr_func_CODEC_DEMOD_IN_INT0_VECT
; Frame Delay Time PCD to PICC ends
.global CODEC_TIMER_SAMPLING_CCC_VECT
CODEC_TIMER_SAMPLING_CCC_VECT:
push r30
push r31
lds r30, isr_func_TCD0_CCC_vect
lds r31, isr_func_TCD0_CCC_vect + 1
icall
pop r31
pop r30
reti
call_isr isr_func_TCD0_CCC_vect