text
stringlengths
0
234
This.Time.Delay_Milliseconds (10);
for X in UInt8 range 0 .. 64 loop
Discard := This.Read_Register (X);
end loop;
declare
Id : constant UInt16 := This.Get_IOE_ID;
begin
if Id /= 16#0811# then
return False;
end if;
Function Definition: procedure Initialize;
Function Body: ----------------
-- Initialize --
----------------
procedure Initialize is
Config : RP.SPI.SPI_Configuration;
begin
SPI_CLK.Configure (RP.GPIO.Output, RP.GPIO.Pull_Up, RP.GPIO.SPI);
SPI_DO.Configure (RP.GPIO.Output, RP.GPIO.Pull_Up, RP.GPIO.SPI);
SPI_DI.Configure (RP.GPIO.Output, RP.GPIO.Pull_Up, RP.GPIO.SPI);
Config := RP.SPI.Default_SPI_Configuration;
Config.Baud := 10_000_000;
Config.Blocking := True;
SPI_Port.Configure (Config);
-- DMA --
declare
use RP.DMA;
Config : DMA_Configuration;
begin
Config.Trigger := DMA_TX_Trigger;
Config.High_Priority := True;
Config.Data_Size := Transfer_8;
Config.Increment_Read := True;
Config.Increment_Write := False;
RP.DMA.Configure (SPI_TX_DMA, Config);
Function Definition: procedure CommsTime is
Function Body: -- Parameters for the experimental run.
-- Experiments - number of data points collected
-- Iterations_Experiment - number of cycles round commstime for a single data point
Experiments : CONSTANT INTEGER := 100;
Iterations_Experiment : CONSTANT INTEGER := 10000;
task PREFIX is
entry Send(Value : in INTEGER);
end PREFIX;
task SEQ_DELTA is
entry Send(Value : in INTEGER);
end SEQ_DELTA;
task SUCC is
entry Send(Value : in INTEGER);
end SUCC;
task PRINTER is
entry Send(Value : in INTEGER);
end PRINTER;
task body PREFIX is
N : INTEGER;
begin
for i in 0..Experiments loop
SEQ_DELTA.Send(0);
for j in 0..Iterations_Experiment loop
accept Send(Value : in INTEGER) do
N := Value;
Function Definition: procedure Getinfo is
Function Body: use GNAT.Command_Line;
use Ada.Text_IO;
command_Name : constant String :=
Ada.Directories.Base_Name (Ada.Command_Line.Command_Name);
procedure Help;
procedure Help is
use ASCII;
begin
Put_Line
(command_Name & " [options]" & LF &
"Options:" & LF &
" --ada-library-version Print Ada-Library version" & LF &
" --binding-version Print Binding version" & LF &
" --library-version Print version of the 0mq library." & LF &
" -? | -h | --help Print this text");
end Help;
begin
loop
case Getopt ("-binding-version " &
"-ada-library-version " &