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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - OTG_FS control and status register (OTG_FS_GOTGCTL)"]
pub gotgctl: crate::Reg<gotgctl::GOTGCTL_SPEC>,
#[doc = "0x04 - OTG_FS interrupt register (OTG_FS_GOTGINT)"]
pub gotgint: crate::Reg<gotgint::GOTGINT_SPEC>,
#[doc = "0x08 - OTG_FS AHB configuration register (OTG_FS_GAHBCFG)"]
pub gahbcfg: crate::Reg<gahbcfg::GAHBCFG_SPEC>,
#[doc = "0x0c - OTG_FS USB configuration register (OTG_FS_GUSBCFG)"]
pub gusbcfg: crate::Reg<gusbcfg::GUSBCFG_SPEC>,
#[doc = "0x10 - OTG_FS reset register (OTG_FS_GRSTCTL)"]
pub grstctl: crate::Reg<grstctl::GRSTCTL_SPEC>,
#[doc = "0x14 - OTG_FS core interrupt register (OTG_FS_GINTSTS)"]
pub gintsts: crate::Reg<gintsts::GINTSTS_SPEC>,
#[doc = "0x18 - OTG_FS interrupt mask register (OTG_FS_GINTMSK)"]
pub gintmsk: crate::Reg<gintmsk::GINTMSK_SPEC>,
_reserved_7_grxstsr: [u8; 0x04],
_reserved_8_grxstsp: [u8; 0x04],
#[doc = "0x24 - OTG_FS Receive FIFO size register (OTG_FS_GRXFSIZ)"]
pub grxfsiz: crate::Reg<grxfsiz::GRXFSIZ_SPEC>,
_reserved_10_dieptxf0: [u8; 0x04],
#[doc = "0x2c - OTG_FS non-periodic transmit FIFO/queue status register (OTG_FS_GNPTXSTS)"]
pub gnptxsts: crate::Reg<gnptxsts::GNPTXSTS_SPEC>,
_reserved12: [u8; 0x08],
#[doc = "0x38 - OTG_FS general core configuration register (OTG_FS_GCCFG)"]
pub gccfg: crate::Reg<gccfg::GCCFG_SPEC>,
#[doc = "0x3c - core ID register"]
pub cid: crate::Reg<cid::CID_SPEC>,
_reserved14: [u8; 0xc0],
#[doc = "0x100 - OTG_FS Host periodic transmit FIFO size register (OTG_FS_HPTXFSIZ)"]
pub hptxfsiz: crate::Reg<hptxfsiz::HPTXFSIZ_SPEC>,
#[doc = "0x104..0x110 - OTF_FS device IN endpoint transmit FIFO size register"]
pub dieptxf: [crate::Reg<dieptxf::DIEPTXF_SPEC>; 3],
}
impl RegisterBlock {
#[doc = "0x104 - OTF_FS device IN endpoint transmit FIFO size register"]
#[inline(always)]
pub fn dieptxf1(&self) -> &crate::Reg<dieptxf::DIEPTXF_SPEC> {
&self.dieptxf[0]
}
#[doc = "0x108 - OTF_FS device IN endpoint transmit FIFO size register"]
#[inline(always)]
pub fn dieptxf2(&self) -> &crate::Reg<dieptxf::DIEPTXF_SPEC> {
&self.dieptxf[1]
}
#[doc = "0x10c - OTF_FS device IN endpoint transmit FIFO size register"]
#[inline(always)]
pub fn dieptxf3(&self) -> &crate::Reg<dieptxf::DIEPTXF_SPEC> {
&self.dieptxf[2]
}
#[doc = "0x1c - OTG status debug read (host mode)"]
#[inline(always)]
pub fn grxstsr_host(&self) -> &crate::Reg<grxstsr_host::GRXSTSR_HOST_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(28usize)
as *const crate::Reg<grxstsr_host::GRXSTSR_HOST_SPEC>)
}
}
#[doc = "0x1c - OTG_FS Receive status debug read(Device mode)"]
#[inline(always)]
pub fn grxstsr_device(&self) -> &crate::Reg<grxstsr_device::GRXSTSR_DEVICE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(28usize)
as *const crate::Reg<grxstsr_device::GRXSTSR_DEVICE_SPEC>)
}
}
#[doc = "0x20 - OTG status read and pop (host mode)"]
#[inline(always)]
pub fn grxstsp_host(&self) -> &crate::Reg<grxstsp_host::GRXSTSP_HOST_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(32usize)
as *const crate::Reg<grxstsp_host::GRXSTSP_HOST_SPEC>)
}
}
#[doc = "0x20 - OTG status read and pop (device mode)"]
#[inline(always)]
pub fn grxstsp_device(&self) -> &crate::Reg<grxstsp_device::GRXSTSP_DEVICE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(32usize)
as *const crate::Reg<grxstsp_device::GRXSTSP_DEVICE_SPEC>)
}
}
#[doc = "0x28 - OTG_FS non-periodic transmit FIFO size register (Host mode)"]
#[inline(always)]
pub fn hnptxfsiz(&self) -> &crate::Reg<hnptxfsiz::HNPTXFSIZ_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(40usize)
as *const crate::Reg<hnptxfsiz::HNPTXFSIZ_SPEC>)
}
}
#[doc = "0x28 - OTG_FS non-periodic transmit FIFO size register (Device mode)"]
#[inline(always)]
pub fn dieptxf0(&self) -> &crate::Reg<dieptxf0::DIEPTXF0_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(40usize)
as *const crate::Reg<dieptxf0::DIEPTXF0_SPEC>)
}
}
}
#[doc = "GOTGCTL register accessor: an alias for `Reg<GOTGCTL_SPEC>`"]
pub type GOTGCTL = crate::Reg<gotgctl::GOTGCTL_SPEC>;
#[doc = "OTG_FS control and status register (OTG_FS_GOTGCTL)"]
pub mod gotgctl;
#[doc = "GOTGINT register accessor: an alias for `Reg<GOTGINT_SPEC>`"]
pub type GOTGINT = crate::Reg<gotgint::GOTGINT_SPEC>;
#[doc = "OTG_FS interrupt register (OTG_FS_GOTGINT)"]
pub mod gotgint;
#[doc = "GAHBCFG register accessor: an alias for `Reg<GAHBCFG_SPEC>`"]
pub type GAHBCFG = crate::Reg<gahbcfg::GAHBCFG_SPEC>;
#[doc = "OTG_FS AHB configuration register (OTG_FS_GAHBCFG)"]
pub mod gahbcfg;
#[doc = "GUSBCFG register accessor: an alias for `Reg<GUSBCFG_SPEC>`"]
pub type GUSBCFG = crate::Reg<gusbcfg::GUSBCFG_SPEC>;
#[doc = "OTG_FS USB configuration register (OTG_FS_GUSBCFG)"]
pub mod gusbcfg;
#[doc = "GRSTCTL register accessor: an alias for `Reg<GRSTCTL_SPEC>`"]
pub type GRSTCTL = crate::Reg<grstctl::GRSTCTL_SPEC>;
#[doc = "OTG_FS reset register (OTG_FS_GRSTCTL)"]
pub mod grstctl;
#[doc = "GINTSTS register accessor: an alias for `Reg<GINTSTS_SPEC>`"]
pub type GINTSTS = crate::Reg<gintsts::GINTSTS_SPEC>;
#[doc = "OTG_FS core interrupt register (OTG_FS_GINTSTS)"]
pub mod gintsts;
#[doc = "GINTMSK register accessor: an alias for `Reg<GINTMSK_SPEC>`"]
pub type GINTMSK = crate::Reg<gintmsk::GINTMSK_SPEC>;
#[doc = "OTG_FS interrupt mask register (OTG_FS_GINTMSK)"]
pub mod gintmsk;
#[doc = "GRXSTSR_Device register accessor: an alias for `Reg<GRXSTSR_DEVICE_SPEC>`"]
pub type GRXSTSR_DEVICE = crate::Reg<grxstsr_device::GRXSTSR_DEVICE_SPEC>;
#[doc = "OTG_FS Receive status debug read(Device mode)"]
pub mod grxstsr_device;
#[doc = "GRXSTSR_Host register accessor: an alias for `Reg<GRXSTSR_HOST_SPEC>`"]
pub type GRXSTSR_HOST = crate::Reg<grxstsr_host::GRXSTSR_HOST_SPEC>;
#[doc = "OTG status debug read (host mode)"]
pub mod grxstsr_host;
#[doc = "GRXFSIZ register accessor: an alias for `Reg<GRXFSIZ_SPEC>`"]
pub type GRXFSIZ = crate::Reg<grxfsiz::GRXFSIZ_SPEC>;
#[doc = "OTG_FS Receive FIFO size register (OTG_FS_GRXFSIZ)"]
pub mod grxfsiz;
#[doc = "DIEPTXF0 register accessor: an alias for `Reg<DIEPTXF0_SPEC>`"]
pub type DIEPTXF0 = crate::Reg<dieptxf0::DIEPTXF0_SPEC>;
#[doc = "OTG_FS non-periodic transmit FIFO size register (Device mode)"]
pub mod dieptxf0;
#[doc = "HNPTXFSIZ register accessor: an alias for `Reg<HNPTXFSIZ_SPEC>`"]
pub type HNPTXFSIZ = crate::Reg<hnptxfsiz::HNPTXFSIZ_SPEC>;
#[doc = "OTG_FS non-periodic transmit FIFO size register (Host mode)"]
pub mod hnptxfsiz;
#[doc = "GNPTXSTS register accessor: an alias for `Reg<GNPTXSTS_SPEC>`"]
pub type GNPTXSTS = crate::Reg<gnptxsts::GNPTXSTS_SPEC>;
#[doc = "OTG_FS non-periodic transmit FIFO/queue status register (OTG_FS_GNPTXSTS)"]
pub mod gnptxsts;
#[doc = "GCCFG register accessor: an alias for `Reg<GCCFG_SPEC>`"]
pub type GCCFG = crate::Reg<gccfg::GCCFG_SPEC>;
#[doc = "OTG_FS general core configuration register (OTG_FS_GCCFG)"]
pub mod gccfg;
#[doc = "CID register accessor: an alias for `Reg<CID_SPEC>`"]
pub type CID = crate::Reg<cid::CID_SPEC>;
#[doc = "core ID register"]
pub mod cid;
#[doc = "HPTXFSIZ register accessor: an alias for `Reg<HPTXFSIZ_SPEC>`"]
pub type HPTXFSIZ = crate::Reg<hptxfsiz::HPTXFSIZ_SPEC>;
#[doc = "OTG_FS Host periodic transmit FIFO size register (OTG_FS_HPTXFSIZ)"]
pub mod hptxfsiz;
#[doc = "DIEPTXF register accessor: an alias for `Reg<DIEPTXF_SPEC>`"]
pub type DIEPTXF = crate::Reg<dieptxf::DIEPTXF_SPEC>;
#[doc = "OTF_FS device IN endpoint transmit FIFO size register"]
pub mod dieptxf;
#[doc = "GRXSTSP_Device register accessor: an alias for `Reg<GRXSTSP_DEVICE_SPEC>`"]
pub type GRXSTSP_DEVICE = crate::Reg<grxstsp_device::GRXSTSP_DEVICE_SPEC>;
#[doc = "OTG status read and pop (device mode)"]
pub mod grxstsp_device;
#[doc = "GRXSTSP_Host register accessor: an alias for `Reg<GRXSTSP_HOST_SPEC>`"]
pub type GRXSTSP_HOST = crate::Reg<grxstsp_host::GRXSTSP_HOST_SPEC>;
#[doc = "OTG status read and pop (host mode)"]
pub mod grxstsp_host;