esp32c6/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;
27#[doc = "Field `RTS_CHG` reader - The raw interrupt status bit for the USB_DEVICE_RTS_CHG_INT interrupt."]
28pub type RTS_CHG_R = crate::BitReader;
29#[doc = "Field `DTR_CHG` reader - The raw interrupt status bit for the USB_DEVICE_DTR_CHG_INT interrupt."]
30pub type DTR_CHG_R = crate::BitReader;
31#[doc = "Field `GET_LINE_CODE` reader - The raw interrupt status bit for the USB_DEVICE_GET_LINE_CODE_INT interrupt."]
32pub type GET_LINE_CODE_R = crate::BitReader;
33#[doc = "Field `SET_LINE_CODE` reader - The raw interrupt status bit for the USB_DEVICE_SET_LINE_CODE_INT interrupt."]
34pub type SET_LINE_CODE_R = crate::BitReader;
35impl R {
36    #[doc = "Bit 0 - The raw interrupt status bit for the USB_DEVICE_JTAG_IN_FLUSH_INT interrupt."]
37    #[inline(always)]
38    pub fn jtag_in_flush(&self) -> JTAG_IN_FLUSH_R {
39        JTAG_IN_FLUSH_R::new((self.bits & 1) != 0)
40    }
41    #[doc = "Bit 1 - The raw interrupt status bit for the USB_DEVICE_SOF_INT interrupt."]
42    #[inline(always)]
43    pub fn sof(&self) -> SOF_R {
44        SOF_R::new(((self.bits >> 1) & 1) != 0)
45    }
46    #[doc = "Bit 2 - The raw interrupt status bit for the USB_DEVICE_SERIAL_OUT_RECV_PKT_INT interrupt."]
47    #[inline(always)]
48    pub fn serial_out_recv_pkt(&self) -> SERIAL_OUT_RECV_PKT_R {
49        SERIAL_OUT_RECV_PKT_R::new(((self.bits >> 2) & 1) != 0)
50    }
51    #[doc = "Bit 3 - The raw interrupt status bit for the USB_DEVICE_SERIAL_IN_EMPTY_INT interrupt."]
52    #[inline(always)]
53    pub fn serial_in_empty(&self) -> SERIAL_IN_EMPTY_R {
54        SERIAL_IN_EMPTY_R::new(((self.bits >> 3) & 1) != 0)
55    }
56    #[doc = "Bit 4 - The raw interrupt status bit for the USB_DEVICE_PID_ERR_INT interrupt."]
57    #[inline(always)]
58    pub fn pid_err(&self) -> PID_ERR_R {
59        PID_ERR_R::new(((self.bits >> 4) & 1) != 0)
60    }
61    #[doc = "Bit 5 - The raw interrupt status bit for the USB_DEVICE_CRC5_ERR_INT interrupt."]
62    #[inline(always)]
63    pub fn crc5_err(&self) -> CRC5_ERR_R {
64        CRC5_ERR_R::new(((self.bits >> 5) & 1) != 0)
65    }
66    #[doc = "Bit 6 - The raw interrupt status bit for the USB_DEVICE_CRC16_ERR_INT interrupt."]
67    #[inline(always)]
68    pub fn crc16_err(&self) -> CRC16_ERR_R {
69        CRC16_ERR_R::new(((self.bits >> 6) & 1) != 0)
70    }
71    #[doc = "Bit 7 - The raw interrupt status bit for the USB_DEVICE_STUFF_ERR_INT interrupt."]
72    #[inline(always)]
73    pub fn stuff_err(&self) -> STUFF_ERR_R {
74        STUFF_ERR_R::new(((self.bits >> 7) & 1) != 0)
75    }
76    #[doc = "Bit 8 - The raw interrupt status bit for the USB_DEVICE_IN_TOKEN_REC_IN_EP1_INT interrupt."]
77    #[inline(always)]
78    pub fn in_token_rec_in_ep1(&self) -> IN_TOKEN_REC_IN_EP1_R {
79        IN_TOKEN_REC_IN_EP1_R::new(((self.bits >> 8) & 1) != 0)
80    }
81    #[doc = "Bit 9 - The raw interrupt status bit for the USB_DEVICE_USB_BUS_RESET_INT interrupt."]
82    #[inline(always)]
83    pub fn usb_bus_reset(&self) -> USB_BUS_RESET_R {
84        USB_BUS_RESET_R::new(((self.bits >> 9) & 1) != 0)
85    }
86    #[doc = "Bit 10 - The raw interrupt status bit for the USB_DEVICE_OUT_EP1_ZERO_PAYLOAD_INT interrupt."]
87    #[inline(always)]
88    pub fn out_ep1_zero_payload(&self) -> OUT_EP1_ZERO_PAYLOAD_R {
89        OUT_EP1_ZERO_PAYLOAD_R::new(((self.bits >> 10) & 1) != 0)
90    }
91    #[doc = "Bit 11 - The raw interrupt status bit for the USB_DEVICE_OUT_EP2_ZERO_PAYLOAD_INT interrupt."]
92    #[inline(always)]
93    pub fn out_ep2_zero_payload(&self) -> OUT_EP2_ZERO_PAYLOAD_R {
94        OUT_EP2_ZERO_PAYLOAD_R::new(((self.bits >> 11) & 1) != 0)
95    }
96    #[doc = "Bit 12 - The raw interrupt status bit for the USB_DEVICE_RTS_CHG_INT interrupt."]
97    #[inline(always)]
98    pub fn rts_chg(&self) -> RTS_CHG_R {
99        RTS_CHG_R::new(((self.bits >> 12) & 1) != 0)
100    }
101    #[doc = "Bit 13 - The raw interrupt status bit for the USB_DEVICE_DTR_CHG_INT interrupt."]
102    #[inline(always)]
103    pub fn dtr_chg(&self) -> DTR_CHG_R {
104        DTR_CHG_R::new(((self.bits >> 13) & 1) != 0)
105    }
106    #[doc = "Bit 14 - The raw interrupt status bit for the USB_DEVICE_GET_LINE_CODE_INT interrupt."]
107    #[inline(always)]
108    pub fn get_line_code(&self) -> GET_LINE_CODE_R {
109        GET_LINE_CODE_R::new(((self.bits >> 14) & 1) != 0)
110    }
111    #[doc = "Bit 15 - The raw interrupt status bit for the USB_DEVICE_SET_LINE_CODE_INT interrupt."]
112    #[inline(always)]
113    pub fn set_line_code(&self) -> SET_LINE_CODE_R {
114        SET_LINE_CODE_R::new(((self.bits >> 15) & 1) != 0)
115    }
116}
117#[cfg(feature = "impl-register-debug")]
118impl core::fmt::Debug for R {
119    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
120        f.debug_struct("INT_ST")
121            .field("jtag_in_flush", &self.jtag_in_flush())
122            .field("sof", &self.sof())
123            .field("serial_out_recv_pkt", &self.serial_out_recv_pkt())
124            .field("serial_in_empty", &self.serial_in_empty())
125            .field("pid_err", &self.pid_err())
126            .field("crc5_err", &self.crc5_err())
127            .field("crc16_err", &self.crc16_err())
128            .field("stuff_err", &self.stuff_err())
129            .field("in_token_rec_in_ep1", &self.in_token_rec_in_ep1())
130            .field("usb_bus_reset", &self.usb_bus_reset())
131            .field("out_ep1_zero_payload", &self.out_ep1_zero_payload())
132            .field("out_ep2_zero_payload", &self.out_ep2_zero_payload())
133            .field("rts_chg", &self.rts_chg())
134            .field("dtr_chg", &self.dtr_chg())
135            .field("get_line_code", &self.get_line_code())
136            .field("set_line_code", &self.set_line_code())
137            .finish()
138    }
139}
140#[doc = "Interrupt status register.\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)."]
141pub struct INT_ST_SPEC;
142impl crate::RegisterSpec for INT_ST_SPEC {
143    type Ux = u32;
144}
145#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
146impl crate::Readable for INT_ST_SPEC {}
147#[doc = "`reset()` method sets INT_ST to value 0"]
148impl crate::Resettable for INT_ST_SPEC {}