comp.lang.ada
 help / color / mirror / Atom feed
* ARM Compiler Locks Up on Declaration of Timing_Event
@ 2014-08-08 11:21 williamjthomas7777
  2014-08-08 12:46 ` williamjthomas7777
  0 siblings, 1 reply; 2+ messages in thread
From: williamjthomas7777 @ 2014-08-08 11:21 UTC (permalink / 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;


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

* Re: ARM Compiler Locks Up on Declaration of Timing_Event
  2014-08-08 11:21 ARM Compiler Locks Up on Declaration of Timing_Event williamjthomas7777
@ 2014-08-08 12:46 ` williamjthomas7777
  0 siblings, 0 replies; 2+ messages in thread
From: williamjthomas7777 @ 2014-08-08 12:46 UTC (permalink / raw)


On Friday, August 8, 2014 7:21:39 AM UTC-4, williamjt...@gmail.com wrote:
> 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;
> 

Too many late nights! Forget the post.

> 
> 
> 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;



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

end of thread, other threads:[~2014-08-08 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08 11:21 ARM Compiler Locks Up on Declaration of Timing_Event williamjthomas7777
2014-08-08 12:46 ` williamjthomas7777

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