1#[doc = "Register `ACK_NUM` reader"]
2pub type R = crate::R<ACK_NUM_SPEC>;
3#[doc = "Register `ACK_NUM` writer"]
4pub type W = crate::W<ACK_NUM_SPEC>;
5#[doc = "Field `ACK_NUM` reader - Indicates the ACK number during software flow control."]
6pub type ACK_NUM_R = crate::FieldReader;
7#[doc = "Field `ACK_NUM` writer - Indicates the ACK number during software flow control."]
8pub type ACK_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9#[doc = "Field `LOAD` writer - Set this bit to load the ACK value of UHCI_ACK_NUM."]
10pub type LOAD_W<'a, REG> = crate::BitWriter<'a, REG>;
11impl R {
12 #[doc = "Bits 0:2 - Indicates the ACK number during software flow control."]
13 #[inline(always)]
14 pub fn ack_num(&self) -> ACK_NUM_R {
15 ACK_NUM_R::new((self.bits & 7) as u8)
16 }
17}
18#[cfg(feature = "impl-register-debug")]
19impl core::fmt::Debug for R {
20 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
21 f.debug_struct("ACK_NUM")
22 .field("ack_num", &format_args!("{}", self.ack_num().bits()))
23 .finish()
24 }
25}
26#[cfg(feature = "impl-register-debug")]
27impl core::fmt::Debug for crate::generic::Reg<ACK_NUM_SPEC> {
28 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
29 core::fmt::Debug::fmt(&self.read(), f)
30 }
31}
32impl W {
33 #[doc = "Bits 0:2 - Indicates the ACK number during software flow control."]
34 #[inline(always)]
35 #[must_use]
36 pub fn ack_num(&mut self) -> ACK_NUM_W<ACK_NUM_SPEC> {
37 ACK_NUM_W::new(self, 0)
38 }
39 #[doc = "Bit 3 - Set this bit to load the ACK value of UHCI_ACK_NUM."]
40 #[inline(always)]
41 #[must_use]
42 pub fn load(&mut self) -> LOAD_W<ACK_NUM_SPEC> {
43 LOAD_W::new(self, 3)
44 }
45}
46#[doc = "UHCI Ack Value Configuration Register0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ack_num::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ack_num::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct ACK_NUM_SPEC;
48impl crate::RegisterSpec for ACK_NUM_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`ack_num::R`](R) reader structure"]
52impl crate::Readable for ACK_NUM_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`ack_num::W`](W) writer structure"]
54impl crate::Writable for ACK_NUM_SPEC {
55 type Safety = crate::Unsafe;
56 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
57 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58}
59#[doc = "`reset()` method sets ACK_NUM to value 0"]
60impl crate::Resettable for ACK_NUM_SPEC {
61 const RESET_VALUE: u32 = 0;
62}