Programming Examples
Appendix B
B-31
/**** If good, clear interrupt type ****/
else
dp–>int_status_to_host = 0;
break;
/**** A confirmation is available ****/
case CONFIRMATION_INTERRUPT :
/**** The application programmer needs to write a routine
***** that handles confirmations. The other examples
***** provided show how to do it when the application
***** waits for a confirmation before proceeding to the
***** next command. An asynchronous version would need
***** to match up confirmations with pending commands
***** using the transaction number and acknowledge the
***** confirmation.
****/
break;
/**** A processing problem is an unrecoverable error ****/
case PROCESSING_PROBLEM_INTERRUPT :
unrecoverable_error(dp);
break;
/**** Unknown interrupt type ****/
default :
break;
}
}
/* Need to issue the End Of Interrupt to the PIC controller(s) */
outportb(LowPICPort, EOI);
if (InterruptNumber > 7) outportb(HighPICPort, EOI); /* if int > 7 then second PIC also */
}