From: jerry@jvdsys.stuyts.nl (Jerry van Dijk)
Subject: Re: serial programming
Date: 1998/12/10
Date: 1998-12-10T00:00:00+00:00 [thread overview]
Message-ID: <F3rt0M.Ap@jvdsys.stuyts.nl> (raw)
In-Reply-To: 74ofr7$6gt$1@nnrp1.dejanews.com
jrstiebe@hotnet.net wrote:
: we're trying to control a frequency inverter with rs-232 serial port,but
: to disable the uart interrupts we usualy clear the second register from
: the uart to zero.with an outportb(3f8+1,0) but when we've ported this
: code to gnat the register is replaced to zero but the action of disable
: don't occur.May gnt interfering with this?We accept any suggestions
Well, assuming you are using DOS, I do not think that GNAT is interfering
in any way, especially if you are using my io_ports package.
Maybe you have the FIFO enabled and it first empties its buffer ?
Hard to tell without knowing the OS, UART and the code you are using.
: another question,how can we make interrupt handling with gnat when we
: trying to make an access to a protected procedure gnat crashes and show:
: "GNAT BUG DETECTED"
Hmmm, I cannot reproduce this with 3.10p on Linux:
procedure Oops is
Buffer_Size : constant := 100;
type Integer_Buffer is array (1 .. Buffer_Size) of Integer;
protected Buffer is
procedure Store (Index, Value : in Integer);
private
Data : Integer_Buffer;
end Buffer;
protected body Buffer is
procedure Store (Index, Value : in Integer) is
begin
Data (Index) := Value;
end Store;
end Buffer;
type Store_Access is access protected procedure (Index, Value : in Integer);
Ptr : Store_Access;
begin
Ptr := Buffer.Store'Access;
Ptr (2, 5);
end Oops;
More info would be helpful...
Jerry.
--
-- Jerry van Dijk | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk
prev parent reply other threads:[~1998-12-10 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-10 0:00 serial programming jrstiebe
1998-12-10 0:00 ` Michael F Brenner
1998-12-10 0:00 ` Jerry van Dijk [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox