#[doc = "Register `PKC_ZRPTR1` reader"]
pub type R = crate::R<PkcZrptr1Spec>;
#[doc = "Register `PKC_ZRPTR1` writer"]
pub type W = crate::W<PkcZrptr1Spec>;
#[doc = "Field `ZPTR` reader - Start address of Z operand in PKCRAM with byte granularity or constant for calculation modes using CONST"]
pub type ZptrR = crate::FieldReader<u16>;
#[doc = "Field `ZPTR` writer - Start address of Z operand in PKCRAM with byte granularity or constant for calculation modes using CONST"]
pub type ZptrW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
#[doc = "Field `RPTR` reader - Start address of R result in PKCRAM with byte granularity"]
pub type RptrR = crate::FieldReader<u16>;
#[doc = "Field `RPTR` writer - Start address of R result in PKCRAM with byte granularity"]
pub type RptrW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
#[doc = "Bits 0:15 - Start address of Z operand in PKCRAM with byte granularity or constant for calculation modes using CONST"]
#[inline(always)]
pub fn zptr(&self) -> ZptrR {
ZptrR::new((self.bits & 0xffff) as u16)
}
#[doc = "Bits 16:31 - Start address of R result in PKCRAM with byte granularity"]
#[inline(always)]
pub fn rptr(&self) -> RptrR {
RptrR::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_ZRPTR1")
.field("zptr", &self.zptr())
.field("rptr", &self.rptr())
.finish()
}
}
impl W {
#[doc = "Bits 0:15 - Start address of Z operand in PKCRAM with byte granularity or constant for calculation modes using CONST"]
#[inline(always)]
pub fn zptr(&mut self) -> ZptrW<'_, PkcZrptr1Spec> {
ZptrW::new(self, 0)
}
#[doc = "Bits 16:31 - Start address of R result in PKCRAM with byte granularity"]
#[inline(always)]
pub fn rptr(&mut self) -> RptrW<'_, PkcZrptr1Spec> {
RptrW::new(self, 16)
}
}
#[doc = "Z+R pointer register, parameter set 1\n\nYou can [`read`](crate::Reg::read) this register and get [`pkc_zrptr1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pkc_zrptr1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PkcZrptr1Spec;
impl crate::RegisterSpec for PkcZrptr1Spec {
type Ux = u32;
}
#[doc = "`read()` method returns [`pkc_zrptr1::R`](R) reader structure"]
impl crate::Readable for PkcZrptr1Spec {}
#[doc = "`write(|w| ..)` method takes [`pkc_zrptr1::W`](W) writer structure"]
impl crate::Writable for PkcZrptr1Spec {
type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PKC_ZRPTR1 to value 0"]
impl crate::Resettable for PkcZrptr1Spec {}