mcxa_pac/pkc0/
pkc_xyptr1.rs1#[doc = "Register `PKC_XYPTR1` reader"]
2pub type R = crate::R<PkcXyptr1Spec>;
3#[doc = "Register `PKC_XYPTR1` writer"]
4pub type W = crate::W<PkcXyptr1Spec>;
5#[doc = "Field `XPTR` reader - Start address of X operand in PKCRAM with byte granularity"]
6pub type XptrR = crate::FieldReader<u16>;
7#[doc = "Field `XPTR` writer - Start address of X operand in PKCRAM with byte granularity"]
8pub type XptrW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `YPTR` reader - Start address of Y operand in PKCRAM with byte granularity"]
10pub type YptrR = crate::FieldReader<u16>;
11#[doc = "Field `YPTR` writer - Start address of Y operand in PKCRAM with byte granularity"]
12pub type YptrW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
13impl R {
14 #[doc = "Bits 0:15 - Start address of X operand in PKCRAM with byte granularity"]
15 #[inline(always)]
16 pub fn xptr(&self) -> XptrR {
17 XptrR::new((self.bits & 0xffff) as u16)
18 }
19 #[doc = "Bits 16:31 - Start address of Y operand in PKCRAM with byte granularity"]
20 #[inline(always)]
21 pub fn yptr(&self) -> YptrR {
22 YptrR::new(((self.bits >> 16) & 0xffff) as u16)
23 }
24}
25#[cfg(feature = "debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("PKC_XYPTR1")
29 .field("xptr", &self.xptr())
30 .field("yptr", &self.yptr())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:15 - Start address of X operand in PKCRAM with byte granularity"]
36 #[inline(always)]
37 pub fn xptr(&mut self) -> XptrW<'_, PkcXyptr1Spec> {
38 XptrW::new(self, 0)
39 }
40 #[doc = "Bits 16:31 - Start address of Y operand in PKCRAM with byte granularity"]
41 #[inline(always)]
42 pub fn yptr(&mut self) -> YptrW<'_, PkcXyptr1Spec> {
43 YptrW::new(self, 16)
44 }
45}
46#[doc = "X+Y pointer register, parameter set 1\n\nYou can [`read`](crate::Reg::read) this register and get [`pkc_xyptr1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pkc_xyptr1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct PkcXyptr1Spec;
48impl crate::RegisterSpec for PkcXyptr1Spec {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`pkc_xyptr1::R`](R) reader structure"]
52impl crate::Readable for PkcXyptr1Spec {}
53#[doc = "`write(|w| ..)` method takes [`pkc_xyptr1::W`](W) writer structure"]
54impl crate::Writable for PkcXyptr1Spec {
55 type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets PKC_XYPTR1 to value 0"]
58impl crate::Resettable for PkcXyptr1Spec {}