esp32c3/usb_device/
int_st.rs

1#[doc = "Register `INT_ST` reader"]
2pub type R = crate::R<INT_ST_SPEC>;
3#[doc = "Field `JTAG_IN_FLUSH` reader - The raw interrupt status bit for the USB_DEVICE_JTAG_IN_FLUSH_INT interrupt."]
4pub type JTAG_IN_FLUSH_R = crate::BitReader;
5#[doc = "Field `SOF` reader - The raw interrupt status bit for the USB_DEVICE_SOF_INT interrupt."]
6pub type SOF_R = crate::BitReader;
7#[doc = "Field `SERIAL_OUT_RECV_PKT` reader - The raw interrupt status bit for the USB_DEVICE_SERIAL_OUT_RECV_PKT_INT interrupt."]
8pub type SERIAL_OUT_RECV_PKT_R = crate::BitReader;
9#[doc = "Field `SERIAL_IN_EMPTY` reader - The raw interrupt status bit for the USB_DEVICE_SERIAL_IN_EMPTY_INT interrupt."]
10pub type SERIAL_IN_EMPTY_R = crate::BitReader;
11#[doc = "Field `PID_ERR` reader - The raw interrupt status bit for the USB_DEVICE_PID_ERR_INT interrupt."]
12pub type PID_ERR_R = crate::BitReader;
13#[doc = "Field `CRC5_ERR` reader - The raw interrupt status bit for the USB_DEVICE_CRC5_ERR_INT interrupt."]
14pub type CRC5_ERR_R = crate::BitReader;
15#[doc = "Field `CRC16_ERR` reader - The raw interrupt status bit for the USB_DEVICE_CRC16_ERR_INT interrupt."]
16pub type CRC16_ERR_R = crate::BitReader;
17#[doc = "Field `STUFF_ERR` reader - The raw interrupt status bit for the USB_DEVICE_STUFF_ERR_INT interrupt."]
18pub type STUFF_ERR_R = crate::BitReader;
19#[doc = "Field `IN_TOKEN_REC_IN_EP1` reader - The raw interrupt status bit for the USB_DEVICE_IN_TOKEN_REC_IN_EP1_INT interrupt."]
20pub type IN_TOKEN_REC_IN_EP1_R = crate::BitReader;
21#[doc = "Field `USB_BUS_RESET` reader - The raw interrupt status bit for the USB_DEVICE_USB_BUS_RESET_INT interrupt."]
22pub type USB_BUS_RESET_R = crate::BitReader;
23#[doc = "Field `OUT_EP1_ZERO_PAYLOAD` reader - The raw interrupt status bit for the USB_DEVICE_OUT_EP1_ZERO_PAYLOAD_INT interrupt."]
24pub type OUT_EP1_ZERO_PAYLOAD_R = crate::BitReader;
25#[doc = "Field `OUT_EP2_ZERO_PAYLOAD` reader - The raw interrupt status bit for the USB_DEVICE_OUT_EP2_ZERO_PAYLOAD_INT interrupt."]
26pub type OUT_EP2_ZERO_PAYLOAD_R = crate::BitReader;
27impl R {
28    #[doc = "Bit 0 - The raw interrupt status bit for the USB_DEVICE_JTAG_IN_FLUSH_INT interrupt."]
29    #[inline(always)]
30    pub fn jtag_in_flush(&self) -> JTAG_IN_FLUSH_R {
31        JTAG_IN_FLUSH_R::new((self.bits & 1) != 0)
32    }
33    #[doc = "Bit 1 - The raw interrupt status bit for the USB_DEVICE_SOF_INT interrupt."]
34    #[inline(always)]
35    pub fn sof(&self) -> SOF_R {
36        SOF_R::new(((self.bits >> 1) & 1) != 0)
37    }
38    #[doc = "Bit 2 - The raw interrupt status bit for the USB_DEVICE_SERIAL_OUT_RECV_PKT_INT interrupt."]
39    #[inline(always)]
40    pub fn serial_out_recv_pkt(&self) -> SERIAL_OUT_RECV_PKT_R {
41        SERIAL_OUT_RECV_PKT_R::new(((self.bits >> 2) & 1) != 0)
42    }
43    #[doc = "Bit 3 - The raw interrupt status bit for the USB_DEVICE_SERIAL_IN_EMPTY_INT interrupt."]
44    #[inline(always)]
45    pub fn serial_in_empty(&self) -> SERIAL_IN_EMPTY_R {
46        SERIAL_IN_EMPTY_R::new(((self.bits >> 3) & 1) != 0)
47    }
48    #[doc = "Bit 4 - The raw interrupt status bit for the USB_DEVICE_PID_ERR_INT interrupt."]
49    #[inline(always)]
50    pub fn pid_err(&self) -> PID_ERR_R {
51        PID_ERR_R::new(((self.bits >> 4) & 1) != 0)
52    }
53    #[doc = "Bit 5 - The raw interrupt status bit for the USB_DEVICE_CRC5_ERR_INT interrupt."]
54    #[inline(always)]
55    pub fn crc5_err(&self) -> CRC5_ERR_R {
56        CRC5_ERR_R::new(((self.bits >> 5) & 1) != 0)
57    }
58    #[doc = "Bit 6 - The raw interrupt status bit for the USB_DEVICE_CRC16_ERR_INT interrupt."]
59    #[inline(always)]
60    pub fn crc16_err(&self) -> CRC16_ERR_R {
61        CRC16_ERR_R::new(((self.bits >> 6) & 1) != 0)
62    }
63    #[doc = "Bit 7 - The raw interrupt status bit for the USB_DEVICE_STUFF_ERR_INT interrupt."]
64    #[inline(always)]
65    pub fn stuff_err(&self) -> STUFF_ERR_R {
66        STUFF_ERR_R::new(((self.bits >> 7) & 1) != 0)
67    }
68    #[doc = "Bit 8 - The raw interrupt status bit for the USB_DEVICE_IN_TOKEN_REC_IN_EP1_INT interrupt."]
69    #[inline(always)]
70    pub fn in_token_rec_in_ep1(&self) -> IN_TOKEN_REC_IN_EP1_R {
71        IN_TOKEN_REC_IN_EP1_R::new(((self.bits >> 8) & 1) != 0)
72    }
73    #[doc = "Bit 9 - The raw interrupt status bit for the USB_DEVICE_USB_BUS_RESET_INT interrupt."]
74    #[inline(always)]
75    pub fn usb_bus_reset(&self) -> USB_BUS_RESET_R {
76        USB_BUS_RESET_R::new(((self.bits >> 9) & 1) != 0)
77    }
78    #[doc = "Bit 10 - The raw interrupt status bit for the USB_DEVICE_OUT_EP1_ZERO_PAYLOAD_INT interrupt."]
79    #[inline(always)]
80    pub fn out_ep1_zero_payload(&self) -> OUT_EP1_ZERO_PAYLOAD_R {
81        OUT_EP1_ZERO_PAYLOAD_R::new(((self.bits >> 10) & 1) != 0)
82    }
83    #[doc = "Bit 11 - The raw interrupt status bit for the USB_DEVICE_OUT_EP2_ZERO_PAYLOAD_INT interrupt."]
84    #[inline(always)]
85    pub fn out_ep2_zero_payload(&self) -> OUT_EP2_ZERO_PAYLOAD_R {
86        OUT_EP2_ZERO_PAYLOAD_R::new(((self.bits >> 11) & 1) != 0)
87    }
88}
89#[cfg(feature = "impl-register-debug")]
90impl core::fmt::Debug for R {
91    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
92        f.debug_struct("INT_ST")
93            .field("jtag_in_flush", &self.jtag_in_flush())
94            .field("sof", &self.sof())
95            .field("serial_out_recv_pkt", &self.serial_out_recv_pkt())
96            .field("serial_in_empty", &self.serial_in_empty())
97            .field("pid_err", &self.pid_err())
98            .field("crc5_err", &self.crc5_err())
99            .field("crc16_err", &self.crc16_err())
100            .field("stuff_err", &self.stuff_err())
101            .field("in_token_rec_in_ep1", &self.in_token_rec_in_ep1())
102            .field("usb_bus_reset", &self.usb_bus_reset())
103            .field("out_ep1_zero_payload", &self.out_ep1_zero_payload())
104            .field("out_ep2_zero_payload", &self.out_ep2_zero_payload())
105            .finish()
106    }
107}
108#[doc = "USB_DEVICE_INT_ST_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`int_st::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
109pub struct INT_ST_SPEC;
110impl crate::RegisterSpec for INT_ST_SPEC {
111    type Ux = u32;
112}
113#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
114impl crate::Readable for INT_ST_SPEC {}
115#[doc = "`reset()` method sets INT_ST to value 0"]
116impl crate::Resettable for INT_ST_SPEC {
117    const RESET_VALUE: u32 = 0;
118}