#[doc = "Register `PKC_XYPTR1` reader"]
pub type R = crate::R<PkcXyptr1Spec>;
#[doc = "Register `PKC_XYPTR1` writer"]
pub type W = crate::W<PkcXyptr1Spec>;
#[doc = "Field `XPTR` reader - Start address of X operand in PKCRAM with byte granularity"]
pub type XptrR = crate::FieldReader<u16>;
#[doc = "Field `XPTR` writer - Start address of X operand in PKCRAM with byte granularity"]
pub type XptrW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
#[doc = "Field `YPTR` reader - Start address of Y operand in PKCRAM with byte granularity"]
pub type YptrR = crate::FieldReader<u16>;
#[doc = "Field `YPTR` writer - Start address of Y operand in PKCRAM with byte granularity"]
pub type YptrW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
    #[doc = "Bits 0:15 - Start address of X operand in PKCRAM with byte granularity"]
    #[inline(always)]
    pub fn xptr(&self) -> XptrR {
        XptrR::new((self.bits & 0xffff) as u16)
    }
    #[doc = "Bits 16:31 - Start address of Y operand in PKCRAM with byte granularity"]
    #[inline(always)]
    pub fn yptr(&self) -> YptrR {
        YptrR::new(((self.bits >> 16) & 0xffff) as u16)
    }
}
#[cfg(feature = "debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("PKC_XYPTR1")
            .field("xptr", &self.xptr())
            .field("yptr", &self.yptr())
            .finish()
    }
}
impl W {
    #[doc = "Bits 0:15 - Start address of X operand in PKCRAM with byte granularity"]
    #[inline(always)]
    pub fn xptr(&mut self) -> XptrW<'_, PkcXyptr1Spec> {
        XptrW::new(self, 0)
    }
    #[doc = "Bits 16:31 - Start address of Y operand in PKCRAM with byte granularity"]
    #[inline(always)]
    pub fn yptr(&mut self) -> YptrW<'_, PkcXyptr1Spec> {
        YptrW::new(self, 16)
    }
}
#[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)."]
pub struct PkcXyptr1Spec;
impl crate::RegisterSpec for PkcXyptr1Spec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`pkc_xyptr1::R`](R) reader structure"]
impl crate::Readable for PkcXyptr1Spec {}
#[doc = "`write(|w| ..)` method takes [`pkc_xyptr1::W`](W) writer structure"]
impl crate::Writable for PkcXyptr1Spec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PKC_XYPTR1 to value 0"]
impl crate::Resettable for PkcXyptr1Spec {}
