comp.lang.ada
 help / color / mirror / Atom feed
From: williamjthomas7777@gmail.com
Subject: ARM Compiler Locks Up on Declaration of Timing_Event
Date: Fri, 8 Aug 2014 04:21:39 -0700 (PDT)
Date: 2014-08-08T04:21:39-07:00	[thread overview]
Message-ID: <94976f36-e795-4899-91fa-219481eaaf09@googlegroups.com> (raw)

When I take the LED demo and add this package to it and then "with" it from the main program the compiler locks up (starts to compile, never returns). I'm not using a local timer which is restricted. Please show me the error its choking on.

with Ada.Real_Time.Timing_Events; 
use Ada.Real_Time.Timing_Events;

package Timer_Pack is

   Event_1 : Timing_Event;
   
   R1 : constant Integer := 500;

  procedure Initialize;

   protected Timers is
     procedure Rate_1 ( Event : in out Timing_Event );
   private
     State : Boolean := False;
   end Timers;

end Timer_Pack;

with LEDs; use LEDs;

package body Timer_Pack is

   procedure Initialize is
   begin
     Set_Handler(Event1,Milliseconds(R1),Rate_1'Access);
   end Initialize;

    protected body Timers is

     procedure Rate_1 ( Event : in out Timing_Event ) is
     begin
        State := not State;
        if 
          State 
        then 
          On(Green); 
        else 
          Off(Green); 
        end if;
        Set_Handler(Event,Milliseconds(R1),Current_Event_Handler(Event));
     end Rate_1;

   end Timers;

end Timer_Pack;


             reply	other threads:[~2014-08-08 11:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 11:21 williamjthomas7777 [this message]
2014-08-08 12:46 ` ARM Compiler Locks Up on Declaration of Timing_Event williamjthomas7777
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox