From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ling Su" To: "Jonathan Larmour" Cc: Subject: Re: [ECOS] How to make a Interrupt driven serial port driver? Date: Sun, 29 Oct 2000 18:28:00 -0000 Message-id: <007701c04219$5ab4d530$0301a8c0@leopard> References: <003d01c0407a$0f66d880$1201a8c0@crusoe> <39FC9A15.8DBAA00C@redhat.com> X-SW-Source: 2000-10/msg00347.html > Look at the end of the serial driver, above the DSR. Here's what it says: > > // Note: This device presents a single interrupt for both channels. Thus > the > // interrupt handler has to query the device and decide which channel needs > service. > > and indeed in the code: > > > stat = scc_read_ctl(port, R3); > if (stat & (RR3_AExt | RR3_ATxIP | RR3_ARxIP)) { > chan = vrc4373_chans[0]; // Hardware channel A > vrc4373_int(chan, stat>>3); // Handle interrupt > } else if (stat & (RR3_BExt | RR3_BTxIP | RR3_BRxIP)) { > chan = vrc4373_chans[1]; // Hardware channel A > vrc4373_int(chan, stat); // Handle interrupt > } else { > > Although the second comment is wrong (it should be channel A then channel > B, not two channel A's obviously) - I'll fix that now. > > So in fact it should already be interrupt driven. > > Or instead are you asking for some sort of automatic notification to your > application when data arrives? > Yeah, exactly, what I am asking is how to make a kind of automatic notification to my application, so that my own serial port handler can continue process that data when data arrives. Any clue? Thanks! Rgds, -Ling