void fifoint_isr();
extern far void vectors();
void int_init()
{
IRQ_resetAll();
IRQ_setVecs(vectors);
IRQ_nmiEnable();
IRQ_globalEnable();
//
IRQ_reset(IRQ_EVT_EXTINT4);
IRQ_enable(IRQ_EVT_EXTINT4);
*(Uint32*)(0x019c0008) = 1;//中断条件 0上升,1下降
*(unsigned short*)EPLE_TEST = 0X0;
IRQ_clear(IRQ_EVT_EXTINT4);
}
interrupt void fifoint_isr()
{
IRQ_disable(IRQ_EVT_EXTINT4);
//
com_isr232();
//
IRQ_clear(IRQ_EVT_EXTINT4);
IRQ_enable(IRQ_EVT_EXTINT4);
}
//修改vector.asm
.global _vectors
.global _c_int00
.global _vector1
.global _vector2
.global _vector3
.global _fifoint_isr
.global _vector5
.global _vector6
.global _vector7
.global _vector8
.global _vector9
.global _vector10
.global _vector11
.global _vector12
.global _vector13
.global _vector14
.global _vector15
_vectors:
_vector0: VEC_ENTRY _c_int00 ;RESET
_vector1: VEC_ENTRY _vec_dummy ;NMI
_vector2: VEC_ENTRY _vec_dummy ;RSVD
_vector3: VEC_ENTRY _vec_dummy
_vector4: VEC_ENTRY _fifoint_isr
_vector5: VEC_ENTRY _vec_dummy
_vector6: VEC_ENTRY _vec_dummy
_vector7: VEC_ENTRY _vec_dummy
_vector8: VEC_ENTRY _vec_dummy
_vector9: VEC_ENTRY _vec_dummy
_vector10: VEC_ENTRY _vec_dummy
_vector11: VEC_ENTRY _vec_dummy
_vector12: VEC_ENTRY _vec_dummy
_vector13: VEC_ENTRY _vec_dummy
_vector14: VEC_ENTRY _vec_dummy
_vector15: VEC_ENTRY _vec_dummy
版权声明:本文为博主原创文章,未经博主允许不得转载。