-
Notifications
You must be signed in to change notification settings - Fork 0
/
stm32_svd-vref.ads
80 lines (65 loc) · 2.1 KB
/
stm32_svd-vref.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32L4R9.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.VREF is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- VREF control and status register
type CSR_Register is record
ENVR : Boolean := False;
-- Voltage reference buffer enable
HIZ : Boolean := True;
-- High impedance mode
VRS : Boolean := False;
-- Voltage reference scale
VRR : Boolean := False;
-- Read-only. Voltage reference buffer ready
Reserved_4_31 : HAL.UInt28 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CSR_Register use record
ENVR at 0 range 0 .. 0;
HIZ at 0 range 1 .. 1;
VRS at 0 range 2 .. 2;
VRR at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype CCR_TRIM_Field is HAL.UInt6;
-- calibration control register
type CCR_Register is record
TRIM : CCR_TRIM_Field := 16#0#;
-- Trimming code
Reserved_6_31 : HAL.UInt26 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CCR_Register use record
TRIM at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Voltage reference buffer
type VREFBUF_Peripheral is record
CSR : aliased CSR_Register;
-- VREF control and status register
CCR : aliased CCR_Register;
-- calibration control register
end record
with Volatile;
for VREFBUF_Peripheral use record
CSR at 16#0# range 0 .. 31;
CCR at 16#4# range 0 .. 31;
end record;
-- Voltage reference buffer
VREFBUF_Periph : aliased VREFBUF_Peripheral
with Import, Address => VREFBUF_Base;
end STM32_SVD.VREF;