Standardize register access
This commit is contained in:
parent
5e42b68f47
commit
c044e5243b
|
|
@ -1,22 +1,14 @@
|
||||||
package Interfaces.RP2040.PIO is
|
package Interfaces.RP2040.PIO is
|
||||||
|
|
||||||
type Bit is range 0 .. 1;
|
|
||||||
for Bit'Size use 1;
|
|
||||||
|
|
||||||
type Bit_32 is mod 2**32;
|
|
||||||
for Bit_32'Size use 32;
|
|
||||||
|
|
||||||
type Bit_Array is array (Natural range <>) of Bit
|
|
||||||
with Pack;
|
|
||||||
|
|
||||||
type CTRL_Type is
|
type CTRL_Type is
|
||||||
record
|
record
|
||||||
SM_Enable : Bit_Array (0 .. 3);
|
SM_Enable : Bit_4;
|
||||||
SM_Restart : Bit_Array (0 .. 3);
|
SM_Restart : Bit_4;
|
||||||
CLKDIV_Restart : Bit_Array (0 .. 3);
|
CLKDIV_Restart : Bit_4;
|
||||||
Reserved : Bit_Array (0 .. 19);
|
Reserved : Bit_20;
|
||||||
end record
|
end record
|
||||||
with Object_Size => 32, Bit_Order => System.Low_Order_First;
|
with Object_Size => 32, Bit_Order => System.Low_Order_First,
|
||||||
|
Volatile, Full_Access_Only;
|
||||||
|
|
||||||
for CTRL_Type use
|
for CTRL_Type use
|
||||||
record
|
record
|
||||||
|
|
@ -28,16 +20,17 @@ package Interfaces.RP2040.PIO is
|
||||||
|
|
||||||
type FSTAT_Type is
|
type FSTAT_Type is
|
||||||
record
|
record
|
||||||
RXFULL : Bit_Array (0 .. 3);
|
RXFULL : Bit_4;
|
||||||
Reserved_4_7 : Bit_Array (4 .. 7);
|
Reserved_4_7 : Bit_4;
|
||||||
RXEMPTY : Bit_Array (8 .. 11);
|
RXEMPTY : Bit_4;
|
||||||
Reserved_12_15 : Bit_Array (12 .. 15);
|
Reserved_12_15 : Bit_4;
|
||||||
TXFULL : Bit_Array (16 .. 19);
|
TXFULL : Bit_4;
|
||||||
Reserved_20_23 : Bit_Array (20 .. 23);
|
Reserved_20_23 : Bit_4;
|
||||||
TXEMPTY : Bit_Array (24 .. 27);
|
TXEMPTY : Bit_4;
|
||||||
Reserved_28_31 : Bit_Array (28 .. 31);
|
Reserved_28_31 : Bit_4;
|
||||||
end record
|
end record
|
||||||
with Object_Size => 32, Bit_Order => System.Low_Order_First;
|
with Object_Size => 32, Bit_Order => System.Low_Order_First,
|
||||||
|
Volatile, Full_Access_Only;
|
||||||
|
|
||||||
for FSTAT_Type use
|
for FSTAT_Type use
|
||||||
record
|
record
|
||||||
|
|
@ -66,7 +59,7 @@ package Interfaces.RP2040.PIO is
|
||||||
PIO_1 : PIO_Type
|
PIO_1 : PIO_Type
|
||||||
with Address => PIO_1_Base, Volatile;
|
with Address => PIO_1_Base, Volatile;
|
||||||
|
|
||||||
Direct_PIO_1 : PIO_Type
|
Direct_PIO_1 : Direct_PIO_Type
|
||||||
with Address => PIO_1_Base, Volatile;
|
with Address => PIO_1_Base, Volatile;
|
||||||
|
|
||||||
end Interfaces.RP2040.PIO;
|
end Interfaces.RP2040.PIO;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,10 @@ package Interfaces
|
||||||
type Bit_4 is mod 2**4
|
type Bit_4 is mod 2**4
|
||||||
with Size => 4;
|
with Size => 4;
|
||||||
|
|
||||||
type Bit_31 is mod 2**32
|
type Bit_20 is mod 2**20
|
||||||
|
with Size => 20;
|
||||||
|
|
||||||
|
type Bit_31 is mod 2**31
|
||||||
with Size => 31;
|
with Size => 31;
|
||||||
type Bit_32 is mod 2**32
|
type Bit_32 is mod 2**32
|
||||||
with Size => 32;
|
with Size => 32;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user