text stringlengths 0 234 |
|---|
(CRC_Unit, |
Controller'Access, |
Stream, |
Input => As_Memory_Section_Reference (Section2'Address).all); |
Function Definition: procedure DSB is |
Function Body: begin |
Asm ("dsb", Volatile => True); |
end DSB; |
--------- |
-- ISB -- |
--------- |
procedure ISB is |
begin |
Asm ("isb", Volatile => True); |
end ISB; |
----------------------- |
-- Cache_Maintenance -- |
----------------------- |
procedure Cache_Maintenance |
(Start : System.Address; |
Len : Natural) |
is |
begin |
if not D_Cache_Enabled then |
return; |
end if; |
declare |
function To_U32 is new Ada.Unchecked_Conversion |
(System.Address, UInt32); |
Op_Size : Integer_32 := Integer_32 (Len); |
Op_Addr : UInt32 := To_U32 (Start); |
Reg : UInt32 with Volatile, Address => Reg_Address; |
begin |
DSB; |
while Op_Size > 0 loop |
Reg := Op_Addr; |
Op_Addr := Op_Addr + Data_Cache_Line_Size; |
Op_Size := Op_Size - Integer_32 (Data_Cache_Line_Size); |
end loop; |
DSB; |
ISB; |
Function Definition: procedure TC_FAT_Read is |
Function Body: function Check_Dir (Dirname : String) return Boolean; |
function Check_File (Basename : String; |
Dirname : String) |
return Boolean; |
function Check_Expected_Number return Boolean; |
Number_Of_Files_Checked : Natural := 0; |
--------------- |
-- Check_Dir -- |
--------------- |
function Check_Dir (Dirname : String) return Boolean is |
DD : Directory_Descriptor; |
Status : File_IO.Status_Code; |
begin |
Put_Line ("Checking directory: '" & Dirname & "'"); |
Status := Open (DD, Dirname); |
if Status /= OK then |
Put_Line ("Cannot open directory: '" & Dirname & "'"); |
Put_Line ("Status: " & Status'Img); |
return False; |
end if; |
loop |
declare |
Ent : constant Directory_Entry := Read (DD); |
begin |
if Ent /= Invalid_Dir_Entry then |
if Ent.Name = "." or else Ent.Name = ".." then |
null; -- do nothing |
elsif Ent.Subdirectory then |
if not Check_Dir (Dirname & "/" & Ent.Name) then |
return False; |
end if; |
elsif not Ent.Symlink then |
if not Check_File (Ent.Name, Dirname) then |
return False; |
end if; |
end if; |
else |
exit; |
end if; |
Function Definition: procedure TC_FAT_Write is |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.