I want to develop a driver to control a 8255 ISA card. But I have some
trouble with inetrrupt. I use
InterruptInitialize( Int, hEvent, NULL, 0 );
to initialize "int" with "hEvent". But it return fail.( I try "int" with
3,4,5,6)
Does anyone know what is wrong ?
Dean
When the processor receives an interrupt WinCE will call a function as set
up by the HookInterrupt function to decide what device caused the interrupt.
(For example, the PCI bus can have a variety of different devices all using
the same physical interrupt line). This function will return to CE a *
unique * interrupt ID. The WinCE kernel will then use the interrupt ID to
signal an open event which will start your IST running to process the
interrupt.
What you need to know is the * unique * interrupt ID associated with your
8255 ISA card, and pass that in as your first argument.
Roger
"Dean Tsai" <dean...@advantech.com.tw> wrote in message
news:uvUxE0#mAHA.1384@tkmsftngp05...
DWORD g_SysIntr;
MyInitFunc()
{
//...
g_SysIntr=MapIrq2SysIntr(3); //Ideally should read this from registry and
NOT hard code it
InterruptInitialize(g_SysIntr,hEvent,NULL,0);
//...
}
The reason g_SysIntr is global here is that it must also be used by the IST
to call InterruptDone() there are ways around using a global but this was
simplest for illustration of the question at hand.
--
Steve Maillet
Entelechy Software Consulting
smaillet 'AT' EntelechyConsulting 'DOT' com
http://www.EntelechyConsulting.com
"Dean Tsai" <dean...@advantech.com.tw> wrote in message
news:uvUxE0#mAHA.1384@tkmsftngp05...
Paul T.
"Roger" <Roger.R...@Ivron.com> wrote in message
news:uTfk0##mAHA.1472@tkmsftngp03...
Thanks for your help. The Interrupt can wrok well with IRQNUM = 3,4,5.
But if I use IRQNUM = 6 to call MapIrQ2SysIntr(IRQNUM);
It return fail again. Why ?
Dean
"Steve Maillet" <nos...@nospam.com> wrote in message
news:eo320TBnAHA.1340@tkmsftngp03...
> For the CEPC the LOGICAL IDs used in InterruptInitialize can be obtained
by
> calling MapIrQ2SysIntr(IRQNUM) so the call should be like this
>
> DWORD g_SysIntr;
>
> MyInitFunc()
> {
> //...
> g_SysIntr=MapIrq2SysIntr(3); file://Ideally should read this from