www.a00.de > tcpgroup > 1991 > msg00117
 

TCP-group 1991


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shared interrupts



Yes, Jim, N9GTM has hacked NOS to use shared-interrupt boards.
Since it's not very long, I'll just include it below.  If you encounter
problems, I can forward mail to Jim.
  Mike (KA9WSB)

/* Interrupt handler for 8250 asynch chip */
/* Support multiple ports sharing same IRQ   n9gtm  Dec 21, 1990   */
/* Added support for multiple serial ports hanging off same IRQ.   */
/* You might need to slow down the ports' baud rate....            */
/* Replacement for 8250.c AYSINT routine  PRE-RELEASE version      */
void
asyint(dev)
int dev;
{
        struct asy *asyp;
        struct asy *myasyp;
        unsigned base;
        char iir;
        int mydev;

        asyp = &Asy[dev];
        for (mydev=0; mydev < ASY_MAX; mydev++) {
            myasyp = &Asy[mydev];
            if (myasyp->iface != NULLIF)
                if (myasyp->vec == asyp->vec) {
                    base = myasyp->addr;
                    while(((iir = inportb(base+IIR)) & IIR_IP) == 0){
                            switch(iir & IIR_ID){
                            case IIR_RDA:   /* Receiver interrupt */
                                    asyrxint(myasyp);
                                    break;
                            case IIR_THRE:  /* Transmit interrupt */
                                    asytxint(mydev);
                                    break;
                            case IIR_MSTAT: /* Modem status change */
                                    asymsint(mydev);
                                    myasyp->cts_flow_ints++;
                                    break;
                            }
                            /* should happen at end of a single slip packet */
                            if(iir & IIR_FIFO_TIMEOUT)
                                    myasyp->fifotimeouts++;
                    }
                }
        }
}

----- End Included Message -----





Document URL : http://www.a00.de/tcpgroup/1991/msg00117.php
Ralf D. Kloth, Ludwigsburg, DE (QRQ.software). < hostmaster at a00.de > [don't send spam]
Created 2004-12-21. Last modified 2004-12-21. Your visit 2024-04-25 11:58.59. Page created in 0.0194 sec.
 
[Go to the top of this page]   [... to the index page]