esp32c3/usb_device/
int_clr.rs1#[doc = "Register `INT_CLR` writer"]
2pub type W = crate::W<INT_CLR_SPEC>;
3#[doc = "Field `JTAG_IN_FLUSH` writer - Set this bit to clear the USB_DEVICE_JTAG_IN_FLUSH_INT interrupt."]
4pub type JTAG_IN_FLUSH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
5#[doc = "Field `SOF` writer - Set this bit to clear the USB_DEVICE_JTAG_SOF_INT interrupt."]
6pub type SOF_W<'a, REG> = crate::BitWriter1C<'a, REG>;
7#[doc = "Field `SERIAL_OUT_RECV_PKT` writer - Set this bit to clear the USB_DEVICE_SERIAL_OUT_RECV_PKT_INT interrupt."]
8pub type SERIAL_OUT_RECV_PKT_W<'a, REG> = crate::BitWriter1C<'a, REG>;
9#[doc = "Field `SERIAL_IN_EMPTY` writer - Set this bit to clear the USB_DEVICE_SERIAL_IN_EMPTY_INT interrupt."]
10pub type SERIAL_IN_EMPTY_W<'a, REG> = crate::BitWriter1C<'a, REG>;
11#[doc = "Field `PID_ERR` writer - Set this bit to clear the USB_DEVICE_PID_ERR_INT interrupt."]
12pub type PID_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>;
13#[doc = "Field `CRC5_ERR` writer - Set this bit to clear the USB_DEVICE_CRC5_ERR_INT interrupt."]
14pub type CRC5_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>;
15#[doc = "Field `CRC16_ERR` writer - Set this bit to clear the USB_DEVICE_CRC16_ERR_INT interrupt."]
16pub type CRC16_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>;
17#[doc = "Field `STUFF_ERR` writer - Set this bit to clear the USB_DEVICE_STUFF_ERR_INT interrupt."]
18pub type STUFF_ERR_W<'a, REG> = crate::BitWriter1C<'a, REG>;
19#[doc = "Field `IN_TOKEN_REC_IN_EP1` writer - Set this bit to clear the USB_DEVICE_IN_TOKEN_IN_EP1_INT interrupt."]
20pub type IN_TOKEN_REC_IN_EP1_W<'a, REG> = crate::BitWriter1C<'a, REG>;
21#[doc = "Field `USB_BUS_RESET` writer - Set this bit to clear the USB_DEVICE_USB_BUS_RESET_INT interrupt."]
22pub type USB_BUS_RESET_W<'a, REG> = crate::BitWriter1C<'a, REG>;
23#[doc = "Field `OUT_EP1_ZERO_PAYLOAD` writer - Set this bit to clear the USB_DEVICE_OUT_EP1_ZERO_PAYLOAD_INT interrupt."]
24pub type OUT_EP1_ZERO_PAYLOAD_W<'a, REG> = crate::BitWriter1C<'a, REG>;
25#[doc = "Field `OUT_EP2_ZERO_PAYLOAD` writer - Set this bit to clear the USB_DEVICE_OUT_EP2_ZERO_PAYLOAD_INT interrupt."]
26pub type OUT_EP2_ZERO_PAYLOAD_W<'a, REG> = crate::BitWriter1C<'a, REG>;
27#[cfg(feature = "impl-register-debug")]
28impl core::fmt::Debug for crate::generic::Reg<INT_CLR_SPEC> {
29 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
30 write!(f, "(not readable)")
31 }
32}
33impl W {
34 #[doc = "Bit 0 - Set this bit to clear the USB_DEVICE_JTAG_IN_FLUSH_INT interrupt."]
35 #[inline(always)]
36 pub fn jtag_in_flush(&mut self) -> JTAG_IN_FLUSH_W<INT_CLR_SPEC> {
37 JTAG_IN_FLUSH_W::new(self, 0)
38 }
39 #[doc = "Bit 1 - Set this bit to clear the USB_DEVICE_JTAG_SOF_INT interrupt."]
40 #[inline(always)]
41 pub fn sof(&mut self) -> SOF_W<INT_CLR_SPEC> {
42 SOF_W::new(self, 1)
43 }
44 #[doc = "Bit 2 - Set this bit to clear the USB_DEVICE_SERIAL_OUT_RECV_PKT_INT interrupt."]
45 #[inline(always)]
46 pub fn serial_out_recv_pkt(&mut self) -> SERIAL_OUT_RECV_PKT_W<INT_CLR_SPEC> {
47 SERIAL_OUT_RECV_PKT_W::new(self, 2)
48 }
49 #[doc = "Bit 3 - Set this bit to clear the USB_DEVICE_SERIAL_IN_EMPTY_INT interrupt."]
50 #[inline(always)]
51 pub fn serial_in_empty(&mut self) -> SERIAL_IN_EMPTY_W<INT_CLR_SPEC> {
52 SERIAL_IN_EMPTY_W::new(self, 3)
53 }
54 #[doc = "Bit 4 - Set this bit to clear the USB_DEVICE_PID_ERR_INT interrupt."]
55 #[inline(always)]
56 pub fn pid_err(&mut self) -> PID_ERR_W<INT_CLR_SPEC> {
57 PID_ERR_W::new(self, 4)
58 }
59 #[doc = "Bit 5 - Set this bit to clear the USB_DEVICE_CRC5_ERR_INT interrupt."]
60 #[inline(always)]
61 pub fn crc5_err(&mut self) -> CRC5_ERR_W<INT_CLR_SPEC> {
62 CRC5_ERR_W::new(self, 5)
63 }
64 #[doc = "Bit 6 - Set this bit to clear the USB_DEVICE_CRC16_ERR_INT interrupt."]
65 #[inline(always)]
66 pub fn crc16_err(&mut self) -> CRC16_ERR_W<INT_CLR_SPEC> {
67 CRC16_ERR_W::new(self, 6)
68 }
69 #[doc = "Bit 7 - Set this bit to clear the USB_DEVICE_STUFF_ERR_INT interrupt."]
70 #[inline(always)]
71 pub fn stuff_err(&mut self) -> STUFF_ERR_W<INT_CLR_SPEC> {
72 STUFF_ERR_W::new(self, 7)
73 }
74 #[doc = "Bit 8 - Set this bit to clear the USB_DEVICE_IN_TOKEN_IN_EP1_INT interrupt."]
75 #[inline(always)]
76 pub fn in_token_rec_in_ep1(&mut self) -> IN_TOKEN_REC_IN_EP1_W<INT_CLR_SPEC> {
77 IN_TOKEN_REC_IN_EP1_W::new(self, 8)
78 }
79 #[doc = "Bit 9 - Set this bit to clear the USB_DEVICE_USB_BUS_RESET_INT interrupt."]
80 #[inline(always)]
81 pub fn usb_bus_reset(&mut self) -> USB_BUS_RESET_W<INT_CLR_SPEC> {
82 USB_BUS_RESET_W::new(self, 9)
83 }
84 #[doc = "Bit 10 - Set this bit to clear the USB_DEVICE_OUT_EP1_ZERO_PAYLOAD_INT interrupt."]
85 #[inline(always)]
86 pub fn out_ep1_zero_payload(&mut self) -> OUT_EP1_ZERO_PAYLOAD_W<INT_CLR_SPEC> {
87 OUT_EP1_ZERO_PAYLOAD_W::new(self, 10)
88 }
89 #[doc = "Bit 11 - Set this bit to clear the USB_DEVICE_OUT_EP2_ZERO_PAYLOAD_INT interrupt."]
90 #[inline(always)]
91 pub fn out_ep2_zero_payload(&mut self) -> OUT_EP2_ZERO_PAYLOAD_W<INT_CLR_SPEC> {
92 OUT_EP2_ZERO_PAYLOAD_W::new(self, 11)
93 }
94}
95#[doc = "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`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
96pub struct INT_CLR_SPEC;
97impl crate::RegisterSpec for INT_CLR_SPEC {
98 type Ux = u32;
99}
100#[doc = "`write(|w| ..)` method takes [`int_clr::W`](W) writer structure"]
101impl crate::Writable for INT_CLR_SPEC {
102 type Safety = crate::Unsafe;
103 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
104 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x0fff;
105}
106#[doc = "`reset()` method sets INT_CLR to value 0"]
107impl crate::Resettable for INT_CLR_SPEC {
108 const RESET_VALUE: u32 = 0;
109}