mimxrt685s_pac/usbhsd/
databufstart.rs1#[doc = "Register `DATABUFSTART` reader"]
2pub type R = crate::R<DatabufstartSpec>;
3#[doc = "Register `DATABUFSTART` writer"]
4pub type W = crate::W<DatabufstartSpec>;
5#[doc = "Field `DA_BUF_FIXED` reader - The fixed portion of the data buffer start address."]
6pub type DaBufFixedR = crate::FieldReader<u32>;
7#[doc = "Field `DA_BUF` reader - Programmable portion of the data buffer start address."]
8pub type DaBufR = crate::FieldReader<u16>;
9#[doc = "Field `DA_BUF` writer - Programmable portion of the data buffer start address."]
10pub type DaBufW<'a, REG> = crate::FieldWriter<'a, REG, 14, u16>;
11impl R {
12 #[doc = "Bits 0:17 - The fixed portion of the data buffer start address."]
13 #[inline(always)]
14 pub fn da_buf_fixed(&self) -> DaBufFixedR {
15 DaBufFixedR::new(self.bits & 0x0003_ffff)
16 }
17 #[doc = "Bits 18:31 - Programmable portion of the data buffer start address."]
18 #[inline(always)]
19 pub fn da_buf(&self) -> DaBufR {
20 DaBufR::new(((self.bits >> 18) & 0x3fff) as u16)
21 }
22}
23#[cfg(feature = "debug")]
24impl core::fmt::Debug for R {
25 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
26 f.debug_struct("DATABUFSTART")
27 .field("da_buf_fixed", &self.da_buf_fixed())
28 .field("da_buf", &self.da_buf())
29 .finish()
30 }
31}
32impl W {
33 #[doc = "Bits 18:31 - Programmable portion of the data buffer start address."]
34 #[inline(always)]
35 pub fn da_buf(&mut self) -> DaBufW<DatabufstartSpec> {
36 DaBufW::new(self, 18)
37 }
38}
39#[doc = "USB Data buffer start address\n\nYou can [`read`](crate::Reg::read) this register and get [`databufstart::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`databufstart::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct DatabufstartSpec;
41impl crate::RegisterSpec for DatabufstartSpec {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`databufstart::R`](R) reader structure"]
45impl crate::Readable for DatabufstartSpec {}
46#[doc = "`write(|w| ..)` method takes [`databufstart::W`](W) writer structure"]
47impl crate::Writable for DatabufstartSpec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets DATABUFSTART to value 0x4100_0000"]
53impl crate::Resettable for DatabufstartSpec {
54 const RESET_VALUE: u32 = 0x4100_0000;
55}