esp32c3/usb_device/
in_ep3_st.rs1#[doc = "Register `IN_EP3_ST` reader"]
2pub type R = crate::R<IN_EP3_ST_SPEC>;
3#[doc = "Field `IN_EP3_STATE` reader - State of IN Endpoint 3."]
4pub type IN_EP3_STATE_R = crate::FieldReader;
5#[doc = "Field `IN_EP3_WR_ADDR` reader - Write data address of IN endpoint 3."]
6pub type IN_EP3_WR_ADDR_R = crate::FieldReader;
7#[doc = "Field `IN_EP3_RD_ADDR` reader - Read data address of IN endpoint 3."]
8pub type IN_EP3_RD_ADDR_R = crate::FieldReader;
9impl R {
10 #[doc = "Bits 0:1 - State of IN Endpoint 3."]
11 #[inline(always)]
12 pub fn in_ep3_state(&self) -> IN_EP3_STATE_R {
13 IN_EP3_STATE_R::new((self.bits & 3) as u8)
14 }
15 #[doc = "Bits 2:8 - Write data address of IN endpoint 3."]
16 #[inline(always)]
17 pub fn in_ep3_wr_addr(&self) -> IN_EP3_WR_ADDR_R {
18 IN_EP3_WR_ADDR_R::new(((self.bits >> 2) & 0x7f) as u8)
19 }
20 #[doc = "Bits 9:15 - Read data address of IN endpoint 3."]
21 #[inline(always)]
22 pub fn in_ep3_rd_addr(&self) -> IN_EP3_RD_ADDR_R {
23 IN_EP3_RD_ADDR_R::new(((self.bits >> 9) & 0x7f) as u8)
24 }
25}
26#[cfg(feature = "impl-register-debug")]
27impl core::fmt::Debug for R {
28 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
29 f.debug_struct("IN_EP3_ST")
30 .field("in_ep3_state", &self.in_ep3_state())
31 .field("in_ep3_wr_addr", &self.in_ep3_wr_addr())
32 .field("in_ep3_rd_addr", &self.in_ep3_rd_addr())
33 .finish()
34 }
35}
36#[doc = "USB_DEVICE_IN_EP3_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`in_ep3_st::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct IN_EP3_ST_SPEC;
38impl crate::RegisterSpec for IN_EP3_ST_SPEC {
39 type Ux = u32;
40}
41#[doc = "`read()` method returns [`in_ep3_st::R`](R) reader structure"]
42impl crate::Readable for IN_EP3_ST_SPEC {}
43#[doc = "`reset()` method sets IN_EP3_ST to value 0x01"]
44impl crate::Resettable for IN_EP3_ST_SPEC {
45 const RESET_VALUE: u32 = 0x01;
46}