esp32/uhci0/
quick_sent.rs1#[doc = "Register `QUICK_SENT` reader"]
2pub type R = crate::R<QUICK_SENT_SPEC>;
3#[doc = "Register `QUICK_SENT` writer"]
4pub type W = crate::W<QUICK_SENT_SPEC>;
5#[doc = "Field `SINGLE_SEND_NUM` reader - The bits are used to choose which short packet"]
6pub type SINGLE_SEND_NUM_R = crate::FieldReader;
7#[doc = "Field `SINGLE_SEND_NUM` writer - The bits are used to choose which short packet"]
8pub type SINGLE_SEND_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9#[doc = "Field `SINGLE_SEND_EN` reader - Set this bit to enable send a short packet"]
10pub type SINGLE_SEND_EN_R = crate::BitReader;
11#[doc = "Field `SINGLE_SEND_EN` writer - Set this bit to enable send a short packet"]
12pub type SINGLE_SEND_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ALWAYS_SEND_NUM` reader - The bits are used to choose which short packet"]
14pub type ALWAYS_SEND_NUM_R = crate::FieldReader;
15#[doc = "Field `ALWAYS_SEND_NUM` writer - The bits are used to choose which short packet"]
16pub type ALWAYS_SEND_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17#[doc = "Field `ALWAYS_SEND_EN` reader - Set this bit to enable continuously send the same short packet"]
18pub type ALWAYS_SEND_EN_R = crate::BitReader;
19#[doc = "Field `ALWAYS_SEND_EN` writer - Set this bit to enable continuously send the same short packet"]
20pub type ALWAYS_SEND_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bits 0:2 - The bits are used to choose which short packet"]
23 #[inline(always)]
24 pub fn single_send_num(&self) -> SINGLE_SEND_NUM_R {
25 SINGLE_SEND_NUM_R::new((self.bits & 7) as u8)
26 }
27 #[doc = "Bit 3 - Set this bit to enable send a short packet"]
28 #[inline(always)]
29 pub fn single_send_en(&self) -> SINGLE_SEND_EN_R {
30 SINGLE_SEND_EN_R::new(((self.bits >> 3) & 1) != 0)
31 }
32 #[doc = "Bits 4:6 - The bits are used to choose which short packet"]
33 #[inline(always)]
34 pub fn always_send_num(&self) -> ALWAYS_SEND_NUM_R {
35 ALWAYS_SEND_NUM_R::new(((self.bits >> 4) & 7) as u8)
36 }
37 #[doc = "Bit 7 - Set this bit to enable continuously send the same short packet"]
38 #[inline(always)]
39 pub fn always_send_en(&self) -> ALWAYS_SEND_EN_R {
40 ALWAYS_SEND_EN_R::new(((self.bits >> 7) & 1) != 0)
41 }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46 f.debug_struct("QUICK_SENT")
47 .field("single_send_num", &self.single_send_num())
48 .field("single_send_en", &self.single_send_en())
49 .field("always_send_num", &self.always_send_num())
50 .field("always_send_en", &self.always_send_en())
51 .finish()
52 }
53}
54impl W {
55 #[doc = "Bits 0:2 - The bits are used to choose which short packet"]
56 #[inline(always)]
57 pub fn single_send_num(&mut self) -> SINGLE_SEND_NUM_W<QUICK_SENT_SPEC> {
58 SINGLE_SEND_NUM_W::new(self, 0)
59 }
60 #[doc = "Bit 3 - Set this bit to enable send a short packet"]
61 #[inline(always)]
62 pub fn single_send_en(&mut self) -> SINGLE_SEND_EN_W<QUICK_SENT_SPEC> {
63 SINGLE_SEND_EN_W::new(self, 3)
64 }
65 #[doc = "Bits 4:6 - The bits are used to choose which short packet"]
66 #[inline(always)]
67 pub fn always_send_num(&mut self) -> ALWAYS_SEND_NUM_W<QUICK_SENT_SPEC> {
68 ALWAYS_SEND_NUM_W::new(self, 4)
69 }
70 #[doc = "Bit 7 - Set this bit to enable continuously send the same short packet"]
71 #[inline(always)]
72 pub fn always_send_en(&mut self) -> ALWAYS_SEND_EN_W<QUICK_SENT_SPEC> {
73 ALWAYS_SEND_EN_W::new(self, 7)
74 }
75}
76#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`quick_sent::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`quick_sent::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct QUICK_SENT_SPEC;
78impl crate::RegisterSpec for QUICK_SENT_SPEC {
79 type Ux = u32;
80}
81#[doc = "`read()` method returns [`quick_sent::R`](R) reader structure"]
82impl crate::Readable for QUICK_SENT_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`quick_sent::W`](W) writer structure"]
84impl crate::Writable for QUICK_SENT_SPEC {
85 type Safety = crate::Unsafe;
86}
87#[doc = "`reset()` method sets QUICK_SENT to value 0"]
88impl crate::Resettable for QUICK_SENT_SPEC {}