C51单片机中断函数的定义及应用-为提高代码的容错能力,在没用到的中断入口处生成iret语句,定义没用到的中断。
/* define not used interrupt, so generate “IRET” in their entrance */
void extern0_ISR() interrupt 0{}/* not used */
void timer0_ISR () interrupt 1{}/* not used */
void extern1_ISR() interrupt 2{}/* not used */
void timer1_ISR () interrupt 3{}/* not used */
void serial_ISR () interrupt 4{}/* not used */