outportb(0xa1,inportb(0xa1) | 0x02); /* Mask IRQ 10 */
/* Restore the old handler */
setvect(0x72,old_handler); /* Put back the old interrupt handler */
/* Reenable interrupts. Things are back they way they were before we
started.
*/
enable();
}
/* This function is executed when an edge detection interrupt occurs */
void interrupt int_handler(void)
{
int current;
/* Get the current interrupt pending. There really should be one
here or we shouldn't even be executing this function.
*/
current = get_int();
/* We will continue processing pending edge detect interrupts until
there are no more present. In which case current == 0
*/
while(current)
{
/* Clear the current one so that it's ready for the next edge */
clr_int(current);
/* Tally up one for the current bit number */
++int_counts[current];
/* Get the next one, if any others pending */
current = get_int();
}
/* Issue a non-specific end of interrupt command (EOI) to the
interrupt controller. This rearms it for the next shot.
*/
outportb(0xa0,0x20); /* Do non-specific EOI */
outportb(0x20,0x20);
}
Содержание EBC-LP
Страница 2: ...REVISION HISTORY P N 403 0306 000B ECO Number Date Code Rev Level ORIGINATED 030110 B 03 59 030530 B1...
Страница 68: ...APPENDIX C Mechanical Drawing...
Страница 69: ......
Страница 70: ......
Страница 71: ...APPENDIX D WS16C48 I O Routines and Sample Program Listings...