1#[doc = "Register `DATA` reader"]
2pub type R = crate::R<DataSpec>;
3#[doc = "Register `DATA` writer"]
4pub type W = crate::W<DataSpec>;
5#[doc = "Field `LL` reader - Lower Part of Low Byte"]
6pub type LlR = crate::FieldReader;
7#[doc = "Field `LL` writer - Lower Part of Low Byte"]
8pub type LlW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `LU` reader - Upper Part of Low Byte"]
10pub type LuR = crate::FieldReader;
11#[doc = "Field `LU` writer - Upper Part of Low Byte"]
12pub type LuW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `HL` reader - Lower Part of High Byte"]
14pub type HlR = crate::FieldReader;
15#[doc = "Field `HL` writer - Lower Part of High Byte"]
16pub type HlW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17#[doc = "Field `HU` reader - Upper Part of High Byte"]
18pub type HuR = crate::FieldReader;
19#[doc = "Field `HU` writer - Upper Part of High Byte"]
20pub type HuW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22 #[doc = "Bits 0:7 - Lower Part of Low Byte"]
23 #[inline(always)]
24 pub fn ll(&self) -> LlR {
25 LlR::new((self.bits & 0xff) as u8)
26 }
27 #[doc = "Bits 8:15 - Upper Part of Low Byte"]
28 #[inline(always)]
29 pub fn lu(&self) -> LuR {
30 LuR::new(((self.bits >> 8) & 0xff) as u8)
31 }
32 #[doc = "Bits 16:23 - Lower Part of High Byte"]
33 #[inline(always)]
34 pub fn hl(&self) -> HlR {
35 HlR::new(((self.bits >> 16) & 0xff) as u8)
36 }
37 #[doc = "Bits 24:31 - Upper Part of High Byte"]
38 #[inline(always)]
39 pub fn hu(&self) -> HuR {
40 HuR::new(((self.bits >> 24) & 0xff) as u8)
41 }
42}
43#[cfg(feature = "debug")]
44impl core::fmt::Debug for R {
45 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46 f.debug_struct("DATA")
47 .field("ll", &self.ll())
48 .field("lu", &self.lu())
49 .field("hl", &self.hl())
50 .field("hu", &self.hu())
51 .finish()
52 }
53}
54impl W {
55 #[doc = "Bits 0:7 - Lower Part of Low Byte"]
56 #[inline(always)]
57 pub fn ll(&mut self) -> LlW<'_, DataSpec> {
58 LlW::new(self, 0)
59 }
60 #[doc = "Bits 8:15 - Upper Part of Low Byte"]
61 #[inline(always)]
62 pub fn lu(&mut self) -> LuW<'_, DataSpec> {
63 LuW::new(self, 8)
64 }
65 #[doc = "Bits 16:23 - Lower Part of High Byte"]
66 #[inline(always)]
67 pub fn hl(&mut self) -> HlW<'_, DataSpec> {
68 HlW::new(self, 16)
69 }
70 #[doc = "Bits 24:31 - Upper Part of High Byte"]
71 #[inline(always)]
72 pub fn hu(&mut self) -> HuW<'_, DataSpec> {
73 HuW::new(self, 24)
74 }
75}
76#[doc = "Data\n\nYou can [`read`](crate::Reg::read) this register and get [`data::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`data::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct DataSpec;
78impl crate::RegisterSpec for DataSpec {
79 type Ux = u32;
80}
81#[doc = "`read()` method returns [`data::R`](R) reader structure"]
82impl crate::Readable for DataSpec {}
83#[doc = "`write(|w| ..)` method takes [`data::W`](W) writer structure"]
84impl crate::Writable for DataSpec {
85 type Safety = crate::Unsafe;
86}
87#[doc = "`reset()` method sets DATA to value 0xffff_ffff"]
88impl crate::Resettable for DataSpec {
89 const RESET_VALUE: u32 = 0xffff_ffff;
90}