summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/debug.adb
blob: fd9215c97872a6cc650e1c8fb14d75223d728310 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
with Ada.Text_IO;  use Ada.Text_IO;
with Ada.Numerics.Discrete_Random;

with TS1325.LED;  use TS1325.LED;

with Serial_Debug;  use Serial_Debug;

procedure Debug is

   package Random_LED_Colour is
     new Ada.Numerics.Discrete_Random (LED_Colour);
   use Random_LED_Colour;

   Colour_Gen: Random_LED_Colour.Generator;

   New_Colour: LED_Colour;

   Count: Integer := 0;

begin
   Breakpoint;

   Put_Line ("******* Starting Random LED Debug Test *******");

   for I in 1 .. 10_000 loop
      Count := Count + 1;
      New_Colour := Random_LED_Colour.Random (Colour_Gen);
      LED_State.Set (New_Colour);
   end loop;

   Put_Line ("******* Finished Random LED Debug Test *******");
end Debug;