mcxa_pac/pkc0/
pkc_status.rs1#[doc = "Register `PKC_STATUS` reader"]
2pub type R = crate::R<PkcStatusSpec>;
3#[doc = "Field `ACTIV` reader - PKC ACTIV"]
4pub type ActivR = crate::BitReader;
5#[doc = "Field `CARRY` reader - Carry overflow flag"]
6pub type CarryR = crate::BitReader;
7#[doc = "Field `ZERO` reader - Zero result flag"]
8pub type ZeroR = crate::BitReader;
9#[doc = "Field `GOANY` reader - Combined GO status flag"]
10pub type GoanyR = crate::BitReader;
11#[doc = "Field `LOCKED` reader - Parameter set locked"]
12pub type LockedR = crate::FieldReader;
13impl R {
14 #[doc = "Bit 0 - PKC ACTIV"]
15 #[inline(always)]
16 pub fn activ(&self) -> ActivR {
17 ActivR::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Carry overflow flag"]
20 #[inline(always)]
21 pub fn carry(&self) -> CarryR {
22 CarryR::new(((self.bits >> 1) & 1) != 0)
23 }
24 #[doc = "Bit 2 - Zero result flag"]
25 #[inline(always)]
26 pub fn zero(&self) -> ZeroR {
27 ZeroR::new(((self.bits >> 2) & 1) != 0)
28 }
29 #[doc = "Bit 3 - Combined GO status flag"]
30 #[inline(always)]
31 pub fn goany(&self) -> GoanyR {
32 GoanyR::new(((self.bits >> 3) & 1) != 0)
33 }
34 #[doc = "Bits 5:6 - Parameter set locked"]
35 #[inline(always)]
36 pub fn locked(&self) -> LockedR {
37 LockedR::new(((self.bits >> 5) & 3) as u8)
38 }
39}
40#[cfg(feature = "debug")]
41impl core::fmt::Debug for R {
42 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
43 f.debug_struct("PKC_STATUS")
44 .field("activ", &self.activ())
45 .field("carry", &self.carry())
46 .field("zero", &self.zero())
47 .field("goany", &self.goany())
48 .field("locked", &self.locked())
49 .finish()
50 }
51}
52#[doc = "Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`pkc_status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
53pub struct PkcStatusSpec;
54impl crate::RegisterSpec for PkcStatusSpec {
55 type Ux = u32;
56}
57#[doc = "`read()` method returns [`pkc_status::R`](R) reader structure"]
58impl crate::Readable for PkcStatusSpec {}
59#[doc = "`reset()` method sets PKC_STATUS to value 0"]
60impl crate::Resettable for PkcStatusSpec {}