esp32c3/
usb_device.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    ep1: EP1,
6    ep1_conf: EP1_CONF,
7    int_raw: INT_RAW,
8    int_st: INT_ST,
9    int_ena: INT_ENA,
10    int_clr: INT_CLR,
11    conf0: CONF0,
12    test: TEST,
13    jfifo_st: JFIFO_ST,
14    fram_num: FRAM_NUM,
15    in_ep0_st: IN_EP0_ST,
16    in_ep1_st: IN_EP1_ST,
17    in_ep2_st: IN_EP2_ST,
18    in_ep3_st: IN_EP3_ST,
19    out_ep0_st: OUT_EP0_ST,
20    out_ep1_st: OUT_EP1_ST,
21    out_ep2_st: OUT_EP2_ST,
22    misc_conf: MISC_CONF,
23    mem_conf: MEM_CONF,
24    _reserved19: [u8; 0x34],
25    date: DATE,
26}
27impl RegisterBlock {
28    #[doc = "0x00 - USB_DEVICE_EP1_REG."]
29    #[inline(always)]
30    pub const fn ep1(&self) -> &EP1 {
31        &self.ep1
32    }
33    #[doc = "0x04 - USB_DEVICE_EP1_CONF_REG."]
34    #[inline(always)]
35    pub const fn ep1_conf(&self) -> &EP1_CONF {
36        &self.ep1_conf
37    }
38    #[doc = "0x08 - USB_DEVICE_INT_RAW_REG."]
39    #[inline(always)]
40    pub const fn int_raw(&self) -> &INT_RAW {
41        &self.int_raw
42    }
43    #[doc = "0x0c - USB_DEVICE_INT_ST_REG."]
44    #[inline(always)]
45    pub const fn int_st(&self) -> &INT_ST {
46        &self.int_st
47    }
48    #[doc = "0x10 - USB_DEVICE_INT_ENA_REG."]
49    #[inline(always)]
50    pub const fn int_ena(&self) -> &INT_ENA {
51        &self.int_ena
52    }
53    #[doc = "0x14 - USB_DEVICE_INT_CLR_REG."]
54    #[inline(always)]
55    pub const fn int_clr(&self) -> &INT_CLR {
56        &self.int_clr
57    }
58    #[doc = "0x18 - USB_DEVICE_CONF0_REG."]
59    #[inline(always)]
60    pub const fn conf0(&self) -> &CONF0 {
61        &self.conf0
62    }
63    #[doc = "0x1c - USB_DEVICE_TEST_REG."]
64    #[inline(always)]
65    pub const fn test(&self) -> &TEST {
66        &self.test
67    }
68    #[doc = "0x20 - USB_DEVICE_JFIFO_ST_REG."]
69    #[inline(always)]
70    pub const fn jfifo_st(&self) -> &JFIFO_ST {
71        &self.jfifo_st
72    }
73    #[doc = "0x24 - USB_DEVICE_FRAM_NUM_REG."]
74    #[inline(always)]
75    pub const fn fram_num(&self) -> &FRAM_NUM {
76        &self.fram_num
77    }
78    #[doc = "0x28 - USB_DEVICE_IN_EP0_ST_REG."]
79    #[inline(always)]
80    pub const fn in_ep0_st(&self) -> &IN_EP0_ST {
81        &self.in_ep0_st
82    }
83    #[doc = "0x2c - USB_DEVICE_IN_EP1_ST_REG."]
84    #[inline(always)]
85    pub const fn in_ep1_st(&self) -> &IN_EP1_ST {
86        &self.in_ep1_st
87    }
88    #[doc = "0x30 - USB_DEVICE_IN_EP2_ST_REG."]
89    #[inline(always)]
90    pub const fn in_ep2_st(&self) -> &IN_EP2_ST {
91        &self.in_ep2_st
92    }
93    #[doc = "0x34 - USB_DEVICE_IN_EP3_ST_REG."]
94    #[inline(always)]
95    pub const fn in_ep3_st(&self) -> &IN_EP3_ST {
96        &self.in_ep3_st
97    }
98    #[doc = "0x38 - USB_DEVICE_OUT_EP0_ST_REG."]
99    #[inline(always)]
100    pub const fn out_ep0_st(&self) -> &OUT_EP0_ST {
101        &self.out_ep0_st
102    }
103    #[doc = "0x3c - USB_DEVICE_OUT_EP1_ST_REG."]
104    #[inline(always)]
105    pub const fn out_ep1_st(&self) -> &OUT_EP1_ST {
106        &self.out_ep1_st
107    }
108    #[doc = "0x40 - USB_DEVICE_OUT_EP2_ST_REG."]
109    #[inline(always)]
110    pub const fn out_ep2_st(&self) -> &OUT_EP2_ST {
111        &self.out_ep2_st
112    }
113    #[doc = "0x44 - USB_DEVICE_MISC_CONF_REG."]
114    #[inline(always)]
115    pub const fn misc_conf(&self) -> &MISC_CONF {
116        &self.misc_conf
117    }
118    #[doc = "0x48 - USB_DEVICE_MEM_CONF_REG."]
119    #[inline(always)]
120    pub const fn mem_conf(&self) -> &MEM_CONF {
121        &self.mem_conf
122    }
123    #[doc = "0x80 - USB_DEVICE_DATE_REG."]
124    #[inline(always)]
125    pub const fn date(&self) -> &DATE {
126        &self.date
127    }
128}
129#[doc = "EP1 (rw) register accessor: USB_DEVICE_EP1_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`ep1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ep1`] module"]
130pub type EP1 = crate::Reg<ep1::EP1_SPEC>;
131#[doc = "USB_DEVICE_EP1_REG."]
132pub mod ep1;
133#[doc = "EP1_CONF (rw) register accessor: USB_DEVICE_EP1_CONF_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`ep1_conf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ep1_conf::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ep1_conf`] module"]
134pub type EP1_CONF = crate::Reg<ep1_conf::EP1_CONF_SPEC>;
135#[doc = "USB_DEVICE_EP1_CONF_REG."]
136pub mod ep1_conf;
137#[doc = "INT_RAW (rw) register accessor: USB_DEVICE_INT_RAW_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`int_raw::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_raw::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@int_raw`] module"]
138pub type INT_RAW = crate::Reg<int_raw::INT_RAW_SPEC>;
139#[doc = "USB_DEVICE_INT_RAW_REG."]
140pub mod int_raw;
141#[doc = "INT_ST (r) register accessor: USB_DEVICE_INT_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`int_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@int_st`] module"]
142pub type INT_ST = crate::Reg<int_st::INT_ST_SPEC>;
143#[doc = "USB_DEVICE_INT_ST_REG."]
144pub mod int_st;
145#[doc = "INT_ENA (rw) register accessor: USB_DEVICE_INT_ENA_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`int_ena::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_ena::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@int_ena`] module"]
146pub type INT_ENA = crate::Reg<int_ena::INT_ENA_SPEC>;
147#[doc = "USB_DEVICE_INT_ENA_REG."]
148pub mod int_ena;
149#[doc = "INT_CLR (w) register accessor: USB_DEVICE_INT_CLR_REG.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_clr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@int_clr`] module"]
150pub type INT_CLR = crate::Reg<int_clr::INT_CLR_SPEC>;
151#[doc = "USB_DEVICE_INT_CLR_REG."]
152pub mod int_clr;
153#[doc = "CONF0 (rw) register accessor: USB_DEVICE_CONF0_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`conf0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`conf0::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@conf0`] module"]
154pub type CONF0 = crate::Reg<conf0::CONF0_SPEC>;
155#[doc = "USB_DEVICE_CONF0_REG."]
156pub mod conf0;
157#[doc = "TEST (rw) register accessor: USB_DEVICE_TEST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`test::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`test::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@test`] module"]
158pub type TEST = crate::Reg<test::TEST_SPEC>;
159#[doc = "USB_DEVICE_TEST_REG."]
160pub mod test;
161#[doc = "JFIFO_ST (rw) register accessor: USB_DEVICE_JFIFO_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`jfifo_st::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`jfifo_st::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@jfifo_st`] module"]
162pub type JFIFO_ST = crate::Reg<jfifo_st::JFIFO_ST_SPEC>;
163#[doc = "USB_DEVICE_JFIFO_ST_REG."]
164pub mod jfifo_st;
165#[doc = "FRAM_NUM (r) register accessor: USB_DEVICE_FRAM_NUM_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`fram_num::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@fram_num`] module"]
166pub type FRAM_NUM = crate::Reg<fram_num::FRAM_NUM_SPEC>;
167#[doc = "USB_DEVICE_FRAM_NUM_REG."]
168pub mod fram_num;
169#[doc = "IN_EP0_ST (r) register accessor: USB_DEVICE_IN_EP0_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`in_ep0_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@in_ep0_st`] module"]
170pub type IN_EP0_ST = crate::Reg<in_ep0_st::IN_EP0_ST_SPEC>;
171#[doc = "USB_DEVICE_IN_EP0_ST_REG."]
172pub mod in_ep0_st;
173#[doc = "IN_EP1_ST (r) register accessor: USB_DEVICE_IN_EP1_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`in_ep1_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@in_ep1_st`] module"]
174pub type IN_EP1_ST = crate::Reg<in_ep1_st::IN_EP1_ST_SPEC>;
175#[doc = "USB_DEVICE_IN_EP1_ST_REG."]
176pub mod in_ep1_st;
177#[doc = "IN_EP2_ST (r) register accessor: USB_DEVICE_IN_EP2_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`in_ep2_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@in_ep2_st`] module"]
178pub type IN_EP2_ST = crate::Reg<in_ep2_st::IN_EP2_ST_SPEC>;
179#[doc = "USB_DEVICE_IN_EP2_ST_REG."]
180pub mod in_ep2_st;
181#[doc = "IN_EP3_ST (r) register accessor: USB_DEVICE_IN_EP3_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`in_ep3_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@in_ep3_st`] module"]
182pub type IN_EP3_ST = crate::Reg<in_ep3_st::IN_EP3_ST_SPEC>;
183#[doc = "USB_DEVICE_IN_EP3_ST_REG."]
184pub mod in_ep3_st;
185#[doc = "OUT_EP0_ST (r) register accessor: USB_DEVICE_OUT_EP0_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`out_ep0_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@out_ep0_st`] module"]
186pub type OUT_EP0_ST = crate::Reg<out_ep0_st::OUT_EP0_ST_SPEC>;
187#[doc = "USB_DEVICE_OUT_EP0_ST_REG."]
188pub mod out_ep0_st;
189#[doc = "OUT_EP1_ST (r) register accessor: USB_DEVICE_OUT_EP1_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`out_ep1_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@out_ep1_st`] module"]
190pub type OUT_EP1_ST = crate::Reg<out_ep1_st::OUT_EP1_ST_SPEC>;
191#[doc = "USB_DEVICE_OUT_EP1_ST_REG."]
192pub mod out_ep1_st;
193#[doc = "OUT_EP2_ST (r) register accessor: USB_DEVICE_OUT_EP2_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`out_ep2_st::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@out_ep2_st`] module"]
194pub type OUT_EP2_ST = crate::Reg<out_ep2_st::OUT_EP2_ST_SPEC>;
195#[doc = "USB_DEVICE_OUT_EP2_ST_REG."]
196pub mod out_ep2_st;
197#[doc = "MISC_CONF (rw) register accessor: USB_DEVICE_MISC_CONF_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`misc_conf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`misc_conf::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@misc_conf`] module"]
198pub type MISC_CONF = crate::Reg<misc_conf::MISC_CONF_SPEC>;
199#[doc = "USB_DEVICE_MISC_CONF_REG."]
200pub mod misc_conf;
201#[doc = "MEM_CONF (rw) register accessor: USB_DEVICE_MEM_CONF_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`mem_conf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mem_conf::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mem_conf`] module"]
202pub type MEM_CONF = crate::Reg<mem_conf::MEM_CONF_SPEC>;
203#[doc = "USB_DEVICE_MEM_CONF_REG."]
204pub mod mem_conf;
205#[doc = "DATE (rw) register accessor: USB_DEVICE_DATE_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`date::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`date::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@date`] module"]
206pub type DATE = crate::Reg<date::DATE_SPEC>;
207#[doc = "USB_DEVICE_DATE_REG."]
208pub mod date;