From: Kris Hermans <kris.hermans@cs.kuleuven.ac.be>
Subject: interrupt handling and COM port
Date: 1998/11/04
Date: 1998-11-04T13:57:20+00:00 [thread overview]
Message-ID: <36405CDB.BB53D1B@cs.kuleuven.ac.be> (raw)
Hello,
I`m trying to write 2 programs that communicate through a serial line on
COM2 (2 PC`s with MS_DOS, I use GNAT310).
I believe I can set up the ports correctly, but my problem is to attach
an interrupt handler correctly. I use the following construct:
protected type Interrupt_Interface(Int_Id: Interrupt_Id)
entry Read_N(N: out Natural);
entry Write_N(N: in Natural);
private
entry Done(N: out Natural);
procedure Handler;
pragma Attach_Handler(Handler, Int_Id);
Interrupt_Occurred: Boolean := False;
Next_Request: Boolean := True;
end Interrupt_Interface;
Every time PC1 writes a number to the line, PC2 gets an interrupt and
reads the number for further use. The problem is that I don`t know what
to use for Int_Id. I don`t think it is predefined in Interrupt.Names
Do you know the solution to this or do you have written similar programs
in ADA95? I would appreciate it if you mailed it to me.
friendly regards,
Kris.Hermans@cs.kuleuven.ac.be
next reply other threads:[~1998-11-04 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-04 0:00 Kris Hermans [this message]
-- strict thread matches above, loose matches on Subject: below --
1998-11-04 0:00 interrupt handling and COM port Kris Hermans
1998-11-05 0:00 ` Jerry van Dijk
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox