-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfs.ads
53 lines (41 loc) · 2.16 KB
/
fs.ads
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-------------------------------------------------------------------------
-- --
-- RTEMS FILE-SYSTEM SUPPORT --
-- --
-- F S --
-- --
-- S p e c i f i c a t i o n --
-- --
-- $ Revision: 1.0 $ --
-- --
-- Alejandro Villanueva Uribarri (Universidad de Zaragoza) --
-- --
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-- This file contains basic type declarations needed by the IDE driver --
-- and the File System. --
-------------------------------------------------------------------------
package fs is
pragma Pure;
--[ Types and constants ]---------------------------------------------
type Byte is range 0 .. 2**8 - 1;
for Byte'Size use 8;
type Word is range 0 .. 2**16 - 1;
for Word'Size use 16;
type DWord is range 0 .. 2**32 - 1;
for DWord'Size use 32;
type Byte_Range is range Byte'First .. Byte'Last;
Sector_Size: constant := 512;
type Data_Block is array (0 .. Sector_Size - 1) of Byte;
type Read_or_Write is (Read, Write);
---[ Conversion Routines ]--------------------------------------------
function To_Byte (Data: in Data_Block;
Pos: in Word)
return Byte;
function To_Word (Data: in Data_Block;
Pos: in Word)
return Word;
function To_DWord (Data: in Data_Block;
Pos: in Word)
return DWord;
end fs;