comp.lang.ada
 help / color / mirror / Atom feed
* Re: serial programming
  1998-12-10  0:00 serial programming jrstiebe
@ 1998-12-10  0:00 ` Michael F Brenner
  1998-12-10  0:00 ` Jerry van Dijk
  1 sibling, 0 replies; 3+ messages in thread
From: Michael F Brenner @ 1998-12-10  0:00 UTC (permalink / raw)


I emailed you a code fragment which shows the analysis you will have
to do to get a simple RS-232 working on a personal computer.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: serial programming
  1998-12-10  0:00 serial programming jrstiebe
  1998-12-10  0:00 ` Michael F Brenner
@ 1998-12-10  0:00 ` Jerry van Dijk
  1 sibling, 0 replies; 3+ messages in thread
From: Jerry van Dijk @ 1998-12-10  0:00 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* serial programming
@ 1998-12-10  0:00 jrstiebe
  1998-12-10  0:00 ` Michael F Brenner
  1998-12-10  0:00 ` Jerry van Dijk
  0 siblings, 2 replies; 3+ messages in thread
From: jrstiebe @ 1998-12-10  0:00 UTC (permalink / raw)


may you help us?
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

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"

thanks a lot.

Jesus Tarabini & Valdir Stiebe

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-12-10  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox